Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Improve error message in blueprint-metadata #639

Open
drewstone opened this issue Feb 4, 2025 · 0 comments
Open

[TASK] Improve error message in blueprint-metadata #639

drewstone opened this issue Feb 4, 2025 · 0 comments
Assignees

Comments

@drewstone
Copy link
Contributor

drewstone commented Feb 4, 2025

Overview

When running blueprint_metadata::generate_json(), the rustdoc JSON output is expected to match that of the version in the rust-toolchain.toml in gadget.

When building a blueprint, however, since it also has a rust-toolchain.toml, the doc output will match whatever that version happens to be, leading to this confusion error:

  Reading JSON from /Users/drew/webb/discord-summarizer-rig-blueprint/target/blueprint/doc/discord_summarizer_rig_blueprint.json

  thread 'main' panicked at /Users/drew/.cargo/git/checkouts/gadget-84e3289516f70bdc/b40601a/crates/blueprint/metadata/src/lib.rs:462:59:
  Failed to parse rustdoc JSON: Error("missing field `path`", line: 1, column: 410)
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

We should give a nice error message when deserialization fails, pointing users to the rust-toolchain.toml file in gadget, and telling them that they must match that version.

@github-project-automation github-project-automation bot moved this to Not Started 🕧 in Webb Universe Feb 4, 2025
@Serial-ATA Serial-ATA changed the title [BUG] Building blueprint with Cronjob fails at metadata generation [TASK] Improve error message in blueprint-metadata Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Not Started 🕧
Development

No branches or pull requests

3 participants