{"record":{"id":"030fc7fb9e67d68a","repo":"astrid-runtime/astrid","slug":"cargo-include-path-cannot-be-empty","errorCode":null,"errorMessage":"Cargo include path cannot be empty","messagePattern":"Cargo include path cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-build/src/rust/config.rs","lineNumber":288,"sourceCode":"                    path.display()\n                )\n            })?,\n        };\n        return Ok(vec![resolve_cargo_config_include(path, include, optional)?]);\n    }\n    bail!(\n        \"Cargo include must be a string, array, or table in {}\",\n        path.display()\n    )\n}\n\nfn resolve_cargo_config_include(\n    including_file: &Path,\n    include: &str,\n    optional: bool,\n) -> Result<Option<PathBuf>> {\n    if include.is_empty() {\n        bail!(\"Cargo include path cannot be empty\");\n    }\n    let parent = including_file\n        .parent()\n        .context(\"Cargo configuration file has no parent directory\")?;\n    let candidate = parent.join(include);\n    let resolved = match candidate.canonicalize() {\n        Ok(path) => path,\n        Err(error) if error.kind() == std::io::ErrorKind::NotFound && optional => {\n            return Ok(None);\n        },\n        Err(error) if error.kind() == std::io::ErrorKind::NotFound => {\n            bail!(\n                \"Required Cargo configuration include {} does not exist\",\n                candidate.display()\n            );\n        },\n        Err(error) => {\n            return Err(error).with_context(|| {","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-build/src/rust/config.rs#L270-L306","documentation":"Validation helper guard in resolve_cargo_config_include: the include path string is empty. An empty path has no meaningful parent-relative resolution and would silently match nothing or the wrong directory, so it is rejected before path resolution. Fires from any string/array/table include form whose path value is \"\".","triggerScenarios":"Thrown at crates/astrid-build/src/rust/config.rs:288 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a real relative path in the include directive","Remove the empty include entry","Fix the config file in the named location"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}