{"record":{"id":"9e4a24409d60306b","repo":"BoundaryML/baml","slug":"path-package-prelude-is-reserved-for-the-standard-library-s","errorCode":null,"errorMessage":"{path}: `[package].prelude` is reserved for the standard library's own manifests. Remove it.","messagePattern":"(.+?): `\\[package\\]\\.prelude` is reserved for the standard library's own manifests\\. Remove it\\.","errorType":"validation","errorClass":"ManifestError","httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_db/src/manifest.rs","lineNumber":196,"sourceCode":"}\n\n/// Why a manifest's `[package].name` could not be resolved.\n#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]\npub enum ManifestError {\n    #[error(\n        \"{path}: missing `[package]` table.\\nAdd:\\n\\n    [package]\\n    name = \\\"<your-project-name>\\\"\\n\"\n    )]\n    MissingPackageTable { path: std::path::PathBuf },\n    #[error(\"{path}: `[package]` is missing `name = \\\"<your-project-name>\\\"`.\")]\n    MissingPackageName { path: std::path::PathBuf },\n    #[error(\"{path}: `[package].name` cannot be empty.\")]\n    EmptyPackageName { path: std::path::PathBuf },\n    #[error(\n        \"{path}: `[dependencies]` is not supported in a project manifest yet: package imports are \\\n         pending a design pass. Remove the table; a project reaches the standard library implicitly.\"\n    )]\n    DependenciesUnsupported { path: std::path::PathBuf },\n    #[error(\n        \"{path}: `[package].prelude` is reserved for the standard library's own manifests. Remove it.\"\n    )]\n    PreludeUnsupported { path: std::path::PathBuf },\n}\n\n/// Refuse the manifest tables only the standard library's own manifests may\n/// carry. Package imports are not user surface area until they get a design\n/// pass, so a project manifest with `[dependencies]` (or the stdlib-only\n/// `[package].prelude`) is an error, not a silently ignored table.\npub fn reject_stdlib_only_tables(\n    manifest: &BamlToml,\n    toml_path: &std::path::Path,\n) -> Result<(), ManifestError> {\n    if !manifest.dependencies.is_empty() {\n        return Err(ManifestError::DependenciesUnsupported {\n            path: toml_path.to_path_buf(),\n        });\n    }","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_db/src/manifest.rs#L178-L214","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\n[package]\nname = \"my-project\"\nprelude = [\"std/prelude\"]\n\n// after\n[package]\nname = \"my-project\"","handlingStrategy":"validation","validationCode":"let manifest: toml::Value = toml::from_str(&manifest_src)?;\nif manifest.get(\"package\").and_then(|p| p.get(\"prelude\")).is_some() {\n    return Err(\"[package].prelude is reserved; remove it from the project manifest\".into());\n}","typeGuard":"fn has_reserved_prelude(manifest: &toml::Value) -> bool {\n    manifest.get(\"package\").and_then(|p| p.get(\"prelude\")).is_some()\n}","tryCatchPattern":null,"preventionTips":["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`"],"tags":["manifest","config","baml"],"backgroundTag":"reserved-config-key","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"}