{"record":{"id":"2e8ff42a6ba5859d","repo":"astrid-runtime/astrid","slug":"required-cargo-configuration-include-does-not-e","errorCode":null,"errorMessage":"Required Cargo configuration include {} does not exist","messagePattern":"Required Cargo configuration include (.+?) does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-build/src/rust/config.rs","lineNumber":300,"sourceCode":"fn 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(|| {\n                format!(\n                    \"Failed to resolve Cargo configuration include {}\",\n                    candidate.display()\n                )\n            });\n        },\n    };\n    Ok(Some(resolved))\n}\n\nfn matching_target_rustflags(\n    selected_target: Option<&str>,","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-build/src/rust/config.rs#L282-L318","documentation":"Fired by resolve_cargo_config_include when a non-optional include's file does not exist (or canonicalization fails otherwise). Optional includes that are missing are silently skipped; required ones fail closed.","triggerScenarios":"Thrown at crates/astrid-build/src/rust/config.rs:300 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the missing config file at the referenced path","Fix the include path or remove the directive","Mark it `optional = true` if its absence is acceptable"],"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"}