Skip to content

Add path context to invalid TOML config errors#4815

Open
clockwork-labs-bot wants to merge 1 commit intomasterfrom
bot/config-toml-parse-error
Open

Add path context to invalid TOML config errors#4815
clockwork-labs-bot wants to merge 1 commit intomasterfrom
bot/config-toml-parse-error

Conversation

@clockwork-labs-bot
Copy link
Copy Markdown
Collaborator

Fixes #4749.

Summary

The old report was filed against a spacetime.toml path from 1.11-era CLI flows. On current master, the shared TOML config parser already returns parse failures, but the top-level error does not say which config file was invalid.

This patch makes the shared TOML config loader add file-path context while preserving the underlying TOML span details, so users get an error like invalid TOML syntax in ... followed by the parser's line and column information.

Testing

  • cargo test -p spacetimedb-core parse_config_reports_the_invalid_file_path -- --nocapture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust CLI tool panics on invalid TOML config instead of showing helpful error message

1 participant