Northeastern-Electric-Racing / Northeastern-Electric-Racing/Calypso
[CANGEN] - Add filename to JSON check error messages
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 2
- Avg merge
- 6d 20h
- Merged PRs (30d)
- 3
Description
Description
Right now, on build, Calypso validates the JSON files in Embedded-Base/cangen/can-messages/ are up to spec. If they aren't, the build fails with a message describing what was wrong with the JSON. However, this message doesn't include the name of the file, meaning fixing errors can require some grepping. File names would be a nice touch to the CAN spec dev experience
Acceptance Criteria
CAN spec build errors include the name of the file that causes the error
Proposed Solution
Probably get the file name as __entry from the validate_all_spec() function in libs/calypso-cangen/src/validate.rs, and somehow propagate that to the individual error messages (see the thiserror enum at the top of that same file)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in libs/calypso-cangen/src/validate.rs, reading validate_all_spec() and the thiserror enum at the top of the file. Trace how each validation error is produced and ensure CAN spec build errors identify the file that caused them; completion is confirmed when the acceptance criterion is met for invalid JSON files in Embedded-Base/cangen/can-messages/.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100