jdx/mise · error
swift does not publish
Error message
swift does not publish {url}: {err} What it means
While resolving lockfile info for the core swift plugin, mise performs an HTTP HEAD request against the swift.org download URL for the requested release/platform pair. If that request fails (typically a 404), it means Swift does not publish a toolchain artifact for that URL, so mise refuses to record it in the lockfile. This prevents lockfiles from pinning artifacts that can never be downloaded.
Solutions
- Pick a Swift version that is published for your platform/arch — check https://swift.org/download for the release's platform matrix.
- Verify network access to swift.org (curl -I the URL); retry if it was a transient failure or proxy issue.
- Choose a different distribution/arch pair supported by that release, or use a container/OS image Swift does publish builds for.
Example fix
// before mise use swift@6.0.1 # on ubi9/aarch64 which has no published build // after mise use swift@6.0.2 # release that publishes ubi9 aarch64 toolchains
Defensive patterns
Strategy: validation
Validate before calling
let url = format!("https://swift.org/builds/swift-6.0.1-release/ubuntu2204/swift-6.0.1-RELEASE/swift-6.0.1-ubuntu22.04.tar.gz");
let status = reqwest::Client::new().head(&url).send().await?.status();
if !status.is_success() {
eprintln!("swift {version} not published for this platform ({status}); pick another version/arch");
} Try / catch
match resolve_lock_info(version, target) {
Err(e) if e.to_string().contains("does not publish") => choose_published_version(),
Err(e) => return Err(e),
Ok(info) => info,
} Prevention
- Check the swift.org release platform matrix before pinning a version for an uncommon distro/arch pair.
- Prefer releases known to publish builds for your target OS/arch.
- Pin swift versions in CI on the same platform you deploy on.
When it happens
Trigger: Calling `mise use swift@<version>` or resolving swift lockfile info for a (version, target) combination whose download URL does not exist — e.g. a distro/arch pair like ubi9/aarch64 for a release that has no such build, or a mistyped version. The bail fires when HTTP.head(&url) returns Err.
Common situations: Requesting a Swift release on a platform/arch combo that upstream never published; a release whose published platform matrix changed (older or newer releases drop/add pairs); a transient network failure or proxy blocking swift.org HEAD requests; an invalid version string producing a malformed URL.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- blob chunk upload failed
- blob upload failed
- previous lockfiles were preserved
- download cancelled by user
- {e}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/7f5651adc4f255fe.
Report an issue: GitHub.
Appendix: source
Thrown at src/plugins/core/swift.rs:254
async fn resolve_lock_info(
&self,
tv: &ToolVersion,
target: &PlatformTarget,
) -> Result<PlatformInfo> {
// Every published Linux build links against glibc, so there is nothing
// to lock for a musl target. Fail instead of recording a URL that
// doesn't exist, so `mise lock` reports it as skipped.
if target.libc() == Some("musl") {
bail!("swift does not publish musl builds");
}
let url = url(tv, target);
// Not every distro/arch pair is published — `ubi9` has no aarch64 build,
// for instance — and which pairs exist changes per release, so ask rather
// than encode a matrix that would go stale. This keeps a lockfile from
// recording an artifact that isn't there.
if let Err(err) = HTTP.head(&url).await {
bail!("swift does not publish {url}: {err}");
}
// swift.org publishes no checksum sidecar (only a detached GPG
// signature), so a checksum can't be resolved without downloading the
// whole ~1GB toolchain. Record the URL the entry describes; the checksum
// is filled in when the tool is installed.
Ok(PlatformInfo {
url: Some(url),
..Default::default()
})
}
async fn security_info(&self) -> Vec<crate::backend::SecurityFeature> {
use crate::backend::SecurityFeature;
let mut features = vec![SecurityFeature::Checksum {
algorithm: Some("sha256".to_string()),
}];
View on GitHub (pinned to afd2eddd3a)