arduino / arduino-cli

Arduino command line tool
https://arduino.github.io/arduino-cli/latest/
GNU General Public License v3.0
4.31k stars 373 forks source link

IDE displays #pragma message output as if it were an 'error', which it is not. #2695

Open kriegsman opened 7 years ago

kriegsman commented 7 years ago

The Arduino IDE visually renders the output of #pragma message as if it were an error. When an Arduino library includes any #pragma message output (e.g. just to include version information to assist in debugging, as 'FastLED' does), end users are confused about what they see as "an error message", when no error condition actually exists.

image

This rendering style is appropriate for #pragma error output, but is not appropriate for #pragma message output. #pragma message output should probably either be plain-text, the same as all other compiler output, or rendered in some other way that is visually different from an actual error, e.g., perhaps light blue instead of red. I think my recommendation would be to have it render like ordinary compiler output, e.g., plain white.

I'm one of the maintainers of the FastLED Arduino library, and so I wind up hearing about this Arduino IDE behavior from end users. Here are a couple of examples of Arduino library users getting confused by the Arduino IDE's handling of #pragma message:

Obviously, we could tell everyone to just stop using #pragma message, but there's a reason it exists: to place non-error, informational messages into the compiler output stream so that developers can see them if they go looking for them, but not to have them called out as complete 'errors'; that's what #pragma error is for. So, I think ideally, I'd recommend rendering #pragma message output as regular, non-error, compiler output.

Additional context

Additional reports

facchinm commented 7 years ago

Hi @kriegsman , in fact #pragma statements are printed to stderr and this makes them orange. In fact, also avrdude output and warnings are orange since they both print to stderr too. Solving the pragma specific problem is fairly easy with a filter but it would be nicer to be able to distinguish between an actual error and a simple print to stderr.

RufusVS commented 4 years ago

is there any form of workaround until they get around to fixing this? Or is it unfixable? We are now in 2020 and the issue still exists.

highgear-me commented 2 weeks ago

Warning removal tworkshyd/V2Codebase#31

2024 and still there