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)
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 experienceAcceptance Criteria
CAN spec build errors include the name of the file that causes the error
Proposed Solution
Probably get the file name as
__entryfrom thevalidate_all_spec()function inlibs/calypso-cangen/src/validate.rs, and somehow propagate that to the individual error messages (see thethiserrorenum at the top of that same file)