{"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":null,"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/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/spm.rs#L69-L105","documentation":"The SPM (Swift) backend accepts an 'artifactbundle' option that must evaluate to a boolean-ish value: truthy values mean artifact bundles are required, falsey values mean source-only builds. Any other string/type value is rejected because the option is strictly boolean.","triggerScenarios":"Setting artifactbundle in a mise.toml tool options block to something other than true/false/1/0 — e.g. \"yes\", \"on\", or a non-string type — when lockfile_options parses it via artifactbundle_mode.","commonSituations":"Using YAML/other config truthiness conventions (yes/no/on/off) that mise's SPM options do not accept; quoting numbers oddly or providing a table/list by mistake.","solutions":["Set artifactbundle = true, false, 1, or 0 in the tool options","Remove the option entirely to use the default behavior","Check for stray quoting/type issues in the TOML value"],"exampleFix":"# before\n[tools.\"spm:swift-argparse\"]\nartifactbundle = \"yes\"\n# after\n[tools.\"spm:swift-argparse\"]\nartifactbundle = true","handlingStrategy":"validation","validationCode":"# TOML-side check\n# artifactbundle must be one of: true, false, 1, 0\ngrep -E 'artifactbundle\\s*=\\s*\"?(true|false|1|0)\"?' mise.toml || echo \"invalid artifactbundle value\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use true/false/1/0 for artifactbundle — not yes/on/off","Prefer unquoted TOML booleans (true/false)","Remove the option if you want default behavior"],"tags":["spm","swift","config","options"],"backgroundTag":"invalid-config-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}