xai-org/grok-build · error · io::Error

[[marketplace.sources]] is not an array of tables

Error message

[[marketplace.sources]] is not an array of tables

What it means

Error "[[marketplace.sources]] is not an array of tables" thrown in xai-org/grok-build.

Source

Thrown at crates/codegen/xai-grok-shell/src/extensions/marketplace.rs:988

            format!("invalid TOML: {e}"),
        )
    })?;

    let marketplace_item = doc
        .entry("marketplace")
        .or_insert_with(|| toml_edit::Item::Table(toml_edit::Table::new()));
    let marketplace = marketplace_item.as_table_mut().ok_or_else(|| {
        std::io::Error::new(
            std::io::ErrorKind::InvalidData,
            "[marketplace] is not a table",
        )
    })?;

    let sources_item = marketplace
        .entry("sources")
        .or_insert_with(|| toml_edit::Item::ArrayOfTables(toml_edit::ArrayOfTables::new()));
    let sources = sources_item.as_array_of_tables_mut().ok_or_else(|| {
        std::io::Error::new(
            std::io::ErrorKind::InvalidData,
            "[[marketplace.sources]] is not an array of tables",
        )
    })?;

    // Skip if the normalized URL / path already exists: the pre-lock dup check
    // in handle_add_source can let two serialized adds reach here.
    use crate::plugin::MarketplaceAddInput;
    let already_present = match source {
        MarketplaceAddInput::GitUrl(git_url) => {
            let normalized = git_url.trim_end_matches(".git");
            sources.iter().any(|t| {
                t.get("git")
                    .and_then(|v| v.as_str())
                    .is_some_and(|u| u.trim_end_matches(".git") == normalized)
            })
        }
        MarketplaceAddInput::LocalPath(path) => {

View on GitHub (pinned to bc7f02eddd)

When it happens

Trigger: Thrown at crates/codegen/xai-grok-shell/src/extensions/marketplace.rs:988 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/15d8bb8c116312d2. Report an issue: GitHub.