BoundaryML/baml · error · ManifestError
{path}: `[package].prelude` is reserved for the standard lib
Error message
{path}: `[package].prelude` is reserved for the standard library's own manifests. Remove it. What it means
The BAML manifest parser rejects `[package].prelude` tables in project manifests. This key is reserved exclusively for the standard library's own manifests, so its presence in a user project manifest is a hard parse error directing the author to remove it.
Source
Thrown at baml_language/crates/baml_db/src/manifest.rs:196
}
/// Why a manifest's `[package].name` could not be resolved.
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum ManifestError {
#[error(
"{path}: missing `[package]` table.\nAdd:\n\n [package]\n name = \"<your-project-name>\"\n"
)]
MissingPackageTable { path: std::path::PathBuf },
#[error("{path}: `[package]` is missing `name = \"<your-project-name>\"`.")]
MissingPackageName { path: std::path::PathBuf },
#[error("{path}: `[package].name` cannot be empty.")]
EmptyPackageName { path: std::path::PathBuf },
#[error(
"{path}: `[dependencies]` is not supported in a project manifest yet: package imports are \
pending a design pass. Remove the table; a project reaches the standard library implicitly."
)]
DependenciesUnsupported { path: std::path::PathBuf },
#[error(
"{path}: `[package].prelude` is reserved for the standard library's own manifests. Remove it."
)]
PreludeUnsupported { path: std::path::PathBuf },
}
/// Refuse the manifest tables only the standard library's own manifests may
/// carry. Package imports are not user surface area until they get a design
/// pass, so a project manifest with `[dependencies]` (or the stdlib-only
/// `[package].prelude`) is an error, not a silently ignored table.
pub fn reject_stdlib_only_tables(
manifest: &BamlToml,
toml_path: &std::path::Path,
) -> Result<(), ManifestError> {
if !manifest.dependencies.is_empty() {
return Err(ManifestError::DependenciesUnsupported {
path: toml_path.to_path_buf(),
});
}View on GitHub (pinned to bd85ce9dee)
Solutions
- Remove the `[package].prelude` table (or just the `prelude` key) from the project manifest.
- If prelude behavior is desired, rely on the standard library, which project manifests reach implicitly.
- Check the manifest against current BAML manifest documentation for supported `[package]` keys.
Example fix
// before [package] name = "my-project" prelude = ["std/prelude"] // after [package] name = "my-project"
Defensive patterns
Strategy: validation
Validate before calling
let manifest: toml::Value = toml::from_str(&manifest_src)?;
if manifest.get("package").and_then(|p| p.get("prelude")).is_some() {
return Err("[package].prelude is reserved; remove it from the project manifest".into());
} Type guard
fn has_reserved_prelude(manifest: &toml::Value) -> bool {
manifest.get("package").and_then(|p| p.get("prelude")).is_some()
} Prevention
- Only use documented `[package]` keys in project manifests
- Never copy tables from stdlib manifests into project manifests
- Lint manifests in CI against a schema that rejects `prelude`
When it happens
Trigger: Declaring a `prelude` key inside the `[package]` table of a project's manifest file; the manifest validator at baml_language/crates/baml_db/src/manifest.rs:196 rejects it while parsing.
Common situations: Copying manifest conventions from the standard library's own sources into a project manifest, guessing at manifest fields, or migrating an old manifest format that exposed prelude configuration.
Related errors
- script `{target}` has no `--function` and there is no implic
- test profile `{name}` was requested, but {} does not exist
- test profile `{name}` is not defined in {} (available: {avai
- invalid argument `{token}` in test profile `{name}`: profile
- invalid args in test profile `{name}`: {e}
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/9e4a24409d60306b.
Report an issue: GitHub.