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

[CANGEN] - Add filename to JSON check error messages #87

Open
harrison-e opened this issue Dec 21, 2024 · 0 comments
Open

[CANGEN] - Add filename to JSON check error messages #87

harrison-e opened this issue Dec 21, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@harrison-e
Copy link
Contributor

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)

@harrison-e harrison-e added the good first issue Good for newcomers label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant