jdx/mise · error · eyre::Report

No matching SwiftPM artifact bundle found for {}, but spm.ar

Error message

No matching SwiftPM artifact bundle found for {}, but spm.artifactbundle_only is set

What it means

Same no-match condition as the required-mode error, but here the reason source build is forbidden is the global `spm.artifactbundle_only = true` setting in settings. mise refuses to compile from source because the user explicitly restricted spm installs to prebuilt bundles.

Source

Thrown at src/backend/spm.rs:286

                .try_install_artifactbundle(
                    ctx,
                    &mut tv,
                    &provider,
                    &repo,
                    revision.as_str(),
                    &opts,
                )
                .await
            {
                Ok(true) => return Ok(tv),
                Ok(false) if artifactbundle_required => {
                    bail!(
                        "No matching SwiftPM artifact bundle found for {}",
                        repo.shorthand
                    );
                }
                Ok(false) if Settings::get().spm.artifactbundle_only => {
                    bail!(
                        "No matching SwiftPM artifact bundle found for {}, but spm.artifactbundle_only is set",
                        repo.shorthand
                    );
                }
                Ok(false) => {}
                Err(err) if artifactbundle_required => return Err(err),
                Err(err) if Settings::get().spm.artifactbundle_only => return Err(err),
                Err(err) => {
                    debug!(
                        "SwiftPM artifact bundle install failed, falling back to source build: {err:?}"
                    );
                }
            }
        }

        self.install_from_source(ctx, &tv, &repo, &revision, install_command.as_deref())
            .await?;

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Pick a version of the package that ships an .artifactbundle.zip for your platform
  2. Set an explicit `artifactbundle_asset` if the bundle exists but is not auto-selected (e.g. multiple bundles)
  3. Relax the global setting: remove `spm.artifactbundle_only` or scope it per-project where bundles actually exist

Example fix

# before
[settings.spm]
artifactbundle_only = true

# after
[settings.spm]
# artifactbundle_only removed; source build allowed as fallback
Defensive patterns

Strategy: fallback

Validate before calling

mise settings get spm.artifactbundle_only # know when source builds are globally forbidden

Try / catch

mise install spm:owner/repo@v1 || mise settings unset spm.artifactbundle_only && mise install spm:owner/repo@v1

Prevention

When it happens

Trigger: Setting `[settings.spm] artifactbundle_only = true` in mise.toml or config, then installing an spm tool whose selected release has no artifact bundle asset for the platform.

Common situations: Teams disabling source builds to keep CI fast/offline, then hitting a package (or platform, e.g. Linux where bundles are macOS-only) with no prebuilt bundle.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/1685d0e229f8e30b. Report an issue: GitHub.