Skip to content

Please add recipe for augmenting & explaining compiler errors #1657

Open
@PaulStoffregen

Description

@PaulStoffregen

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.

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: enhancementProposed improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions