-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add a JSON spec check on build #85
Conversation
…/validate.rs) Added CANSpecError enum to calypso-cangen
…er on error or spec side, not sure yet)
…ncluding message description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One wierd thing with submodules. Other than that absolutely loving it. Works hella fast too at least on my computer. thiserror
seems cool never used it before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me when a stale review dismissal doesnt allow me to merge a one line change: 😿
Changes
libs/calypso-cangen/can_types.rs
). For example, if a fieldfoo: 1
were added somewhere in one of the JSON files, and it was not listed incan_types.rs
, Calypso would fail to build.build.rs
now contains a CAN spec validation check, which scansEmbedded-Base/cangen/can-messages/*
to validate that the spec is obeyed properly. The following checks are performed:can-messages
directory and all its entries properly)libs/calypso-cangen/src/validate.rs
CANSpecError
enum, used for descriptive error messages, usesthiserror
crate to make the enumdefault
field in encodable CAN Messages.Notes
CANGEN_SPEC_PATH
tocalypso-cangen
(fromdaedalus
)To Do
Embedded-Base/cangen
anyhow
crate? (likely unnecessary, not sure how much value traces would provide)Closes #81