Skip to content

Please add recipe for augmenting & explaining compiler errors #1657

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

Open
PaulStoffregen opened this issue Feb 9, 2022 · 0 comments
Open
Assignees
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@PaulStoffregen
Copy link

PaulStoffregen commented Feb 9, 2022

The traditional Java-based Arduino IDE has long supported a not-so-well-known feature to print additional explanatory text with certain compiler errors. I would like to request this feature be implemented in arduino-cli.

Here is the specific Java code which adds those messages.

https://github.com/arduino/Arduino/blob/18f55445ab95b193671306688f2a8f4877e95e17/arduino-core/src/cc/arduino/Compiler.java#L528

Because these messages were never designed to be configurable, for many years Teensy's installer has added Teensy-specific messages by patching the Java code! Here are the messages Teensy currently uses:

PaulStoffregen/Arduino-1.8.19-Teensyduino@482d4b2#diff-65f206bfa6cdb316d60c8ad8201572804091992e62c26967338dff4a167aea39R712

My hope is this feature can be configured by platform.txt recipes pairs (match regex & message to print) and documented in the platform specification, so everyone can make use of it.

@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

3 participants