-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Compiler warnings not shown on subsequent compilations #1008
Comments
This is caused by caching: the second time the file is not recompiled if it was unchanged, so the warnings are not shown. The only way I can see to fix this (other than making warnings into errors), is to cache the stdout/stderr output as well, so it can be shown again even when not running the compiler. Not sure if this is the best way to approach this, though. |
@matthijskooijman is correct, caching elides warnings from previous compilations. I believe that |
There is some valuable related discussion here: arduino/arduino-builder#301 Matthijs was kind enough to add a link to here on that end, but it seems the backtrack reference generated by GitHub was lost when I transferred this issue from the arduino/Arduino repo. |
Describe the problem
Compiler warnings for code from non-
.ino
source files are not shown on subsequent sketch compilations.To reproduce
When someone writes code like this (see below) he will correctly get two identical warnings:
When one compiles it again the warnings will all disappear so the user (me) thinks he is perfectly fine and writing clean code.
FunFact: This will not happen if all code is written to the main (.ino) file.
File
DummyClass.h
:File
DummyClass.cpp
:File
test.ino
:Expected behavior
Compiler warnings are shown every time the sketch is compiled if the code would produce a warning.
Arduino CLI version
60a8aa9
Operating system
All
Operating system version
Any
Additional context
Additional reports
Related
Issue checklist
The text was updated successfully, but these errors were encountered: