BoundaryML/baml · error

sdk swift must identify swiftpm/BoundaryML/baml-swift

Error message

sdk swift must identify swiftpm/BoundaryML/baml-swift

What it means

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.

Source

Thrown at baml_language/crates/baml_release/src/manifest.rs:178

fn validate_sdk(language: &str, package: &SdkPackage) -> anyhow::Result<()> {
    if package.registry.is_empty() || package.package.is_empty() || package.version.is_empty() {
        anyhow::bail!("sdk {language} has an empty registry, package, or version");
    }
    if let Some(digest) = &package.verified_package_sha256 {
        validate_sha256(digest)
            .map_err(|error| anyhow::anyhow!("sdk {language} package digest: {error}"))?;
    }
    if language == "csharp" {
        if package.registry != "nuget" || package.package != "baml-bridge" {
            anyhow::bail!("sdk csharp must identify nuget/baml-bridge");
        }
        if package.verified_package_sha256.is_none() {
            anyhow::bail!("sdk csharp must record the verified NuGet package digest");
        }
    }
    if language == "swift" {
        if package.registry != "swiftpm" || package.package != "BoundaryML/baml-swift" {
            anyhow::bail!("sdk swift must identify swiftpm/BoundaryML/baml-swift");
        }
        if package.verified_package_sha256.is_none() {
            anyhow::bail!("sdk swift must record the verified XCFramework package digest");
        }
    }
    Ok(())
}

#[cfg(test)]
mod tests {
    use super::*;

    fn full_target_artifacts() -> BTreeMap<String, Artifact> {
        SUPPORTED_RELEASE_TARGETS
            .iter()
            .map(|target| {
                (
                    (*target).to_string(),

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Set registry = "swiftpm" and package = "BoundaryML/baml-swift" for the swift entry
  2. Check for typos in the org/repo slug, including case
  3. Regenerate the manifest via the release tooling rather than manual edits

Example fix

// before
[sdk.swift]
registry = "github"
package = "boundaryml/baml-swift"

// after
[sdk.swift]
registry = "swiftpm"
package = "BoundaryML/baml-swift"
Defensive patterns

Strategy: validation

Validate before calling

fn swift_entry_valid(p: &SdkPackage) -> bool {
    p.registry == "swiftpm" && p.package == "BoundaryML/baml-swift"
}

Prevention

When it happens

Trigger: validate_sdk() sees language == "swift" with a registry other than "swiftpm" or a package other than "BoundaryML/baml-swift".

Common situations: Forking baml-swift and pointing the manifest at the fork; using a different casing or org name; copying an entry from another language.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/626983b8ecad923c. Report an issue: GitHub.