{"record":{"id":"8559f57bef1d9544","repo":"BoundaryML/baml","slug":"target-target-not-built-for-version","errorCode":null,"errorMessage":"target {target} not built for version {}","messagePattern":"target (.+?) not built for version (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/manifest.rs","lineNumber":108,"sourceCode":"                },\n            )?;\n        }\n        if let Some(cffi) = &self.cffi {\n            for (target, artifact) in cffi {\n                validate_artifact(&format!(\"cffi/{target}\"), artifact)?;\n            }\n        }\n        if let Some(sdks) = &self.sdks {\n            for (language, package) in sdks {\n                validate_sdk(language, package)?;\n            }\n        }\n        Ok(())\n    }\n\n    pub fn artifact_for_target(&self, target: &str) -> anyhow::Result<&Artifact> {\n        self.artifacts.get(target).ok_or_else(|| {\n            anyhow::anyhow!(\"target {target} not built for version {}\", self.version)\n        })\n    }\n}\n\n#[cfg(all(feature = \"self-update\", not(feature = \"no-self-update\")))]\nimpl WrapperManifest {\n    pub fn validate(&self) -> anyhow::Result<()> {\n        validate_schema(self.schema)?;\n        validate_artifacts(&self.version, &self.artifacts)\n    }\n\n    pub fn artifact_for_target(&self, target: &str) -> anyhow::Result<&Artifact> {\n        self.artifacts.get(target).ok_or_else(|| {\n            anyhow::anyhow!(\"target {target} not built for wrapper {}\", self.version)\n        })\n    }\n}\n","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/manifest.rs#L90-L126","documentation":"ReleaseManifest::artifact_for_target looks up the requested target triple in the manifest's artifacts map. When the map has no entry for that target it returns \"target {target} not built for version {version}\", meaning the release simply has no binary published for that platform. This is a data lookup failure, not a validation error.","triggerScenarios":"Calling artifact_for_target(target) on a ReleaseManifest whose artifacts BTreeMap lacks that key — e.g. requesting a target the CI didn't build for that release version, or a typo'd target string.","commonSituations":"Pinning an older BAML version that predates aarch64-linux builds; querying an exotic target (musl variants) not shipped; typos in toolchain config specifying a target for a given version.","solutions":["Choose a target that exists in the manifest (list `manifest.artifacts` keys to see what's built).","Use a newer release version that includes builds for your target.","Fix typos in the requested target triple.","If you control the release pipeline, ensure the target is added to the build matrix."],"exampleFix":"// before\nlet artifact = manifest.artifact_for_target(\"aarch64-unknown-linux-musl\")?; // v0.100 has no musl build\n// after\nlet artifact = manifest.artifact_for_target(\"aarch64-unknown-linux-gnu\")?; // or upgrade version","handlingStrategy":"fallback","validationCode":"if !manifest.artifacts.contains_key(target) {\n    eprintln!(\"{} not built for {}; available: {:?}\", target, manifest.version, manifest.artifacts.keys());\n}","typeGuard":null,"tryCatchPattern":"match manifest.artifact_for_target(target) {\n    Ok(a) => a,\n    Err(_) => manifest.artifact_for_target(fallback_target)\n        .or_else(|_| Err(pick_supported_version())),\n}","preventionTips":["List manifest.artifacts keys before selecting a target.","Don't pin versions older than when your platform's build was introduced.","Filter available versions by target availability in toolchain selection logic."],"tags":["manifest","release","target-triple","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}