astrid-runtime/astrid · error
Cargo include array contains a non-string or non-table…
Error message
Cargo include array contains a non-string or non-table value in {} What it means
Schema validation in cargo_config_includes: an element of a Cargo include array is neither a plain string nor an inline table (the two accepted forms). Only strings and {path=...,optional=...} tables are supported include specifications; anything else (integers, arrays of arrays) makes the include list uninterpretable and load_content aborts.
Solutions
- Use strings for include paths, or tables with a `path` key
- Remove malformed entries from the include array
- Validate the TOML structure of the config file
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/astrid-build/src/rust/config.rs:247 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/9398eaa60ba85268.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-build/src/rust/config.rs:247
.and_then(toml_edit::Value::as_str)
.ok_or_else(|| {
anyhow::anyhow!(
"Cargo include table must contain a string path in {}",
path.display()
)
})?;
let optional = match table.get("optional") {
None => false,
Some(value) => value.as_bool().ok_or_else(|| {
anyhow::anyhow!(
"Cargo include optional must be a boolean in {}",
path.display()
)
})?,
};
Ok(resolve_cargo_config_include(path, include, optional)?)
} else {
bail!(
"Cargo include array contains a non-string or non-table value in {}",
path.display()
)
}
})
.collect();
}
if let Some(table) = item.as_table_like() {
let include = table
.get("path")
.and_then(toml_edit::Item::as_str)
.ok_or_else(|| {
anyhow::anyhow!(
"Cargo include table must contain a string path in {}",
path.display()
)
})?;
let optional = match table.get("optional") {View on GitHub (pinned to affd8760f4)