{"record":{"id":"918789b861a1adf7","repo":"jdx/mise","slug":"artifactbundle-must-be-true-false-1-or-0-got","errorCode":null,"errorMessage":"artifactbundle must be true, false, 1, or 0, got {value}","messagePattern":"artifactbundle must be true, false, 1, or 0, got (.+?)","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/backend/spm.rs","lineNumber":87,"sourceCode":"    }\n\n    fn artifactbundle_asset(&self, target: Option<&PlatformTarget>) -> Option<String> {\n        self.option_string(\"artifactbundle_asset\", target)\n    }\n\n    fn artifactbundle_mode(\n        &self,\n        target: Option<&PlatformTarget>,\n    ) -> eyre::Result<ArtifactBundleMode> {\n        let Some(value) = self.option_string(\"artifactbundle\", target) else {\n            return Ok(ArtifactBundleMode::Auto);\n        };\n        if is_truthy(&value) {\n            Ok(ArtifactBundleMode::Required)\n        } else if is_falsey(&value) {\n            Ok(ArtifactBundleMode::SourceOnly)\n        } else {\n            bail!(\"artifactbundle must be true, false, 1, or 0, got {value}\");\n        }\n    }\n\n    fn requires_artifactbundle(&self, mode: ArtifactBundleMode) -> bool {\n        mode.requires_artifactbundle() || self.artifactbundle_asset(None).is_some()\n    }\n\n    fn lockfile_options(&self, target: &PlatformTarget) -> BTreeMap<String, String> {\n        let mut opts = BTreeMap::new();\n        let provider = self.provider(Some(target));\n        if provider != GitProviderKind::GitHub.as_ref() {\n            opts.insert(\"provider\".to_string(), provider);\n        }\n        if let Some(api_url) = self.api_url(Some(target)) {\n            opts.insert(\"api_url\".to_string(), api_url);\n        }\n        match self.artifactbundle_mode(Some(target)) {\n            Ok(ArtifactBundleMode::Required) => {","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/backend/spm.rs#L69-L105","documentation":"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.","triggerScenarios":"Setting `[tools.\"spm:apple/swift-argument-parser\"] artifactbundle = \"yes\"` or `artifactbundle = \"auto\"` in mise.toml, then installing the tool.","commonSituations":"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.","solutions":["Use `artifactbundle = true` / `false` (booleans) or the strings \"1\" / \"0\"","Remove the key to get auto behavior (try bundle, fall back to source build)"],"exampleFix":"# before\n[tools.\"spm:ReactorKit/ReactorKit\"]\nversion = \"3.2.0\"\nartifactbundle = \"yes\"\n\n# after\n[tools.\"spm:ReactorKit/ReactorKit\"]\nversion = \"3.2.0\"\nartifactbundle = true","handlingStrategy":"validation","validationCode":"! grep -RnE 'artifactbundle[[:space:]]*=[[:space:]]*\"?(true|false|1|0)\"?[^0-9a-z]' mise.toml || true\n# strictly: list every artifactbundle value and eyeball it\n! grep -Rn 'artifactbundle' mise.toml","typeGuard":"fn is_valid_artifactbundle(v: &toml::Value) -> bool {\n    match v.as_str() {\n        Some(s) => matches!(s, \"true\" | \"false\" | \"1\" | \"0\"),\n        None => v.is_bool() || v.is_integer(),\n    }\n}","tryCatchPattern":null,"preventionTips":["Use TOML booleans for artifactbundle, not strings","Omit the key when you want auto behavior"],"tags":["spm","swift","config-validation","mise-toml"],"backgroundTag":"config-validation-failed","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}