{"record":{"id":"626983b8ecad923c","repo":"BoundaryML/baml","slug":"sdk-swift-must-identify-swiftpm-boundaryml-baml-swift","errorCode":null,"errorMessage":"sdk swift must identify swiftpm/BoundaryML/baml-swift","messagePattern":"sdk swift must identify swiftpm/BoundaryML/baml-swift","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/manifest.rs","lineNumber":178,"sourceCode":"fn validate_sdk(language: &str, package: &SdkPackage) -> anyhow::Result<()> {\n    if package.registry.is_empty() || package.package.is_empty() || package.version.is_empty() {\n        anyhow::bail!(\"sdk {language} has an empty registry, package, or version\");\n    }\n    if let Some(digest) = &package.verified_package_sha256 {\n        validate_sha256(digest)\n            .map_err(|error| anyhow::anyhow!(\"sdk {language} package digest: {error}\"))?;\n    }\n    if language == \"csharp\" {\n        if package.registry != \"nuget\" || package.package != \"baml-bridge\" {\n            anyhow::bail!(\"sdk csharp must identify nuget/baml-bridge\");\n        }\n        if package.verified_package_sha256.is_none() {\n            anyhow::bail!(\"sdk csharp must record the verified NuGet package digest\");\n        }\n    }\n    if language == \"swift\" {\n        if package.registry != \"swiftpm\" || package.package != \"BoundaryML/baml-swift\" {\n            anyhow::bail!(\"sdk swift must identify swiftpm/BoundaryML/baml-swift\");\n        }\n        if package.verified_package_sha256.is_none() {\n            anyhow::bail!(\"sdk swift must record the verified XCFramework package digest\");\n        }\n    }\n    Ok(())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    fn full_target_artifacts() -> BTreeMap<String, Artifact> {\n        SUPPORTED_RELEASE_TARGETS\n            .iter()\n            .map(|target| {\n                (\n                    (*target).to_string(),","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/manifest.rs#L160-L196","documentation":"The Swift SDK entry is pinned: it must declare registry \"swiftpm\" and package \"BoundaryML/baml-swift\". Any other values for language \"swift\" fail validation, keeping Swift releases tied to the official XCFramework repository.","triggerScenarios":"validate_sdk() sees language == \"swift\" with a registry other than \"swiftpm\" or a package other than \"BoundaryML/baml-swift\".","commonSituations":"Forking baml-swift and pointing the manifest at the fork; using a different casing or org name; copying an entry from another language.","solutions":["Set registry = \"swiftpm\" and package = \"BoundaryML/baml-swift\" for the swift entry","Check for typos in the org/repo slug, including case","Regenerate the manifest via the release tooling rather than manual edits"],"exampleFix":"// before\n[sdk.swift]\nregistry = \"github\"\npackage = \"boundaryml/baml-swift\"\n\n// after\n[sdk.swift]\nregistry = \"swiftpm\"\npackage = \"BoundaryML/baml-swift\"","handlingStrategy":"validation","validationCode":"fn swift_entry_valid(p: &SdkPackage) -> bool {\n    p.registry == \"swiftpm\" && p.package == \"BoundaryML/baml-swift\"\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy the pinned swift entry from prior release manifests","Do not point the manifest at forks or mirrors","Match the org/repo slug exactly, including case"],"tags":["manifest","sdk","swift"],"backgroundTag":"invalid-config-value","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"}