{"record":{"id":"78601f0aa8de9121","repo":"BoundaryML/baml","slug":"path-package-is-missing-name-your-project-name","errorCode":null,"errorMessage":"{path}: `[package]` is missing `name = \"<your-project-name>\"`.","messagePattern":"(.+?): `\\[package\\]` is missing `name = \"<your-project-name>\"`\\.","errorType":"validation","errorClass":"ManifestError","httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_db/src/manifest.rs","lineNumber":187,"sourceCode":"    pub max_typed_union_arity: Option<Spanned<i64>>,\n\n    #[serde(flatten)]\n    pub unknown: IndexMap<String, toml::Value>,\n}\n\n/// Parse `baml.toml` text into the typed manifest.\npub fn parse(content: &str) -> Result<BamlToml, toml::de::Error> {\n    toml::from_str(content)\n}\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.","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_db/src/manifest.rs#L169-L205","documentation":"A `ManifestError` variant. The manifest has a `[package]` table but it lacks the required `name` key, so the package's identity cannot be resolved. The message names the file and shows the expected syntax `name = \"<your-project-name>\"`.","triggerScenarios":"Loading a manifest whose `[package]` table omits `name` — e.g. `[package]\\nversion = \"0.1.0\"` with no name.","commonSituations":"Manually editing the manifest and deleting the name line; scaffolding tools generating partial tables; merge conflicts that drop a key.","solutions":["Add `name = \"<your-project-name>\"` inside the `[package]` table at the reported path.","Choose a non-empty, valid package name.","Re-run the load to confirm the manifest now resolves."],"exampleFix":"// before\n[package]\nversion = \"0.1.0\"\n// after\n[package]\nname = \"my-project\"\nversion = \"0.1.0\"","handlingStrategy":"try-catch","validationCode":"fn manifest_has_name(raw: &str) -> bool {\n    raw.parse::<toml::Value>().ok()\n        .and_then(|v| v.get(\"package\")?.get(\"name\").cloned())\n        .is_some()\n}","typeGuard":null,"tryCatchPattern":"match load_manifest(path) {\n    Err(ManifestError::MissingPackageName { path }) => eprintln!(\"{path:?}: [package] needs name = \\\"...\\\"\"),\n    Err(e) => eprintln!(\"manifest error: {e}\"),\n    Ok(m) => m,\n}","preventionTips":["Treat `name` as mandatory whenever editing the [package] table.","Check merge diffs for accidentally deleted manifest keys.","Template generators should always emit the name field."],"tags":["toml","manifest","config","missing-key"],"backgroundTag":"missing-required-config-field","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"}