BoundaryML/baml · error
sdk {language} has an empty registry, package, or version
Error message
sdk {language} has an empty registry, package, or version What it means
validate_sdk checks that every SDK entry in the manifest has non-empty registry, package, and version fields. Any of these being empty means the SDK metadata is incomplete and the manifest is invalid.
Source
Thrown at baml_language/crates/baml_release/src/manifest.rs:162
anyhow::bail!("manifest for {version} has target set {actual:?}; expected {expected:?}");
}
for (target, artifact) in artifacts {
validate_artifact(target, artifact)?;
}
Ok(())
}
fn validate_artifact(name: &str, artifact: &Artifact) -> anyhow::Result<()> {
if !artifact.url.starts_with("https://") {
anyhow::bail!("artifact {name} URL must use HTTPS");
}
validate_sha256(&artifact.sha256)?;
Ok(())
}
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() {View on GitHub (pinned to bd85ce9dee)
Solutions
- Fill in the missing registry, package, and/or version fields for that language's SdkPackage
- Verify against the actual published package (registry name, package id, released version)
- Re-run validate() after completing the entry
Example fix
// before [sdk.python] registry = "pypi" package = "baml-py" version = "" // after [sdk.python] registry = "pypi" package = "baml-py" version = "0.11.0"
Defensive patterns
Strategy: validation
Validate before calling
fn sdk_entry_complete(s: &SdkPackage) -> bool {
!s.registry.is_empty() && !s.package.is_empty() && !s.version.is_empty()
} Prevention
- Fill every field of a new SdkPackage before committing it
- Use serde deny_unknown_fields/required fields so empty strings fail deserialization-time checks
- Review manifest diffs for removed fields
When it happens
Trigger: validate() encounters an SdkPackage where registry, package, or version is an empty string — typically a partially filled-in manifest entry for a language.
Common situations: Scaffolding a new SDK entry and forgetting the version; deleting a field during a rename; a template/generator emitting empty placeholders.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- invalid SHA-256 checksum `{hash}`
- unsupported manifest schema {schema}
- manifest for {version} has target set {actual:?}; expected {
- sdk csharp must identify nuget/baml-bridge
- sdk csharp must record the verified NuGet package digest
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/523bbb4e3c1cec02.
Report an issue: GitHub.