jdx/mise · error · eyre::Report

artifactbundle must be true, false, 1, or 0, got {value}

Error message

artifactbundle must be true, false, 1, or 0, got {value}

What it means

The SwiftPM (spm) backend maps its `artifactbundle` option to a tri-state: truthy (true/1) means bundles required, falsey (false/0) means source-only, unset means auto. Any other value — e.g. "yes", "on", "maybe" — fails option parsing.

Source

Thrown at src/backend/spm.rs:87

    }

    fn artifactbundle_asset(&self, target: Option<&PlatformTarget>) -> Option<String> {
        self.option_string("artifactbundle_asset", target)
    }

    fn artifactbundle_mode(
        &self,
        target: Option<&PlatformTarget>,
    ) -> eyre::Result<ArtifactBundleMode> {
        let Some(value) = self.option_string("artifactbundle", target) else {
            return Ok(ArtifactBundleMode::Auto);
        };
        if is_truthy(&value) {
            Ok(ArtifactBundleMode::Required)
        } else if is_falsey(&value) {
            Ok(ArtifactBundleMode::SourceOnly)
        } else {
            bail!("artifactbundle must be true, false, 1, or 0, got {value}");
        }
    }

    fn requires_artifactbundle(&self, mode: ArtifactBundleMode) -> bool {
        mode.requires_artifactbundle() || self.artifactbundle_asset(None).is_some()
    }

    fn lockfile_options(&self, target: &PlatformTarget) -> BTreeMap<String, String> {
        let mut opts = BTreeMap::new();
        let provider = self.provider(Some(target));
        if provider != GitProviderKind::GitHub.as_ref() {
            opts.insert("provider".to_string(), provider);
        }
        if let Some(api_url) = self.api_url(Some(target)) {
            opts.insert("api_url".to_string(), api_url);
        }
        match self.artifactbundle_mode(Some(target)) {
            Ok(ArtifactBundleMode::Required) => {

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Use `artifactbundle = true` / `false` (booleans) or the strings "1" / "0"
  2. Remove the key to get auto behavior (try bundle, fall back to source build)

Example fix

# before
[tools."spm:ReactorKit/ReactorKit"]
version = "3.2.0"
artifactbundle = "yes"

# after
[tools."spm:ReactorKit/ReactorKit"]
version = "3.2.0"
artifactbundle = true
Defensive patterns

Strategy: validation

Validate before calling

! grep -RnE 'artifactbundle[[:space:]]*=[[:space:]]*"?(true|false|1|0)"?[^0-9a-z]' mise.toml || true
# strictly: list every artifactbundle value and eyeball it
! grep -Rn 'artifactbundle' mise.toml

Type guard

fn is_valid_artifactbundle(v: &toml::Value) -> bool {
    match v.as_str() {
        Some(s) => matches!(s, "true" | "false" | "1" | "0"),
        None => v.is_bool() || v.is_integer(),
    }
}

Prevention

When it happens

Trigger: Setting `[tools."spm:apple/swift-argument-parser"] artifactbundle = "yes"` or `artifactbundle = "auto"` in mise.toml, then installing the tool.

Common situations: Assuming mise accepts the same truthy spellings as other tools (yes/no, on/off), or setting the string "auto" expecting to re-enable default behavior.

Understand the failure class

Background: Config validation failed: what "invalid value for {key}" and settings-rejection errors mean across 19 open-source libraries — this error's family across 19 libraries.

Related errors


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