You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, this warning was always printed when multiple libraries were
found for a header filename. arduino#37 reported that this can be confusing for
novice users, when for example a platform library overrides a builtin
library, which is typically considered "normal" and should not generate
a warning.
The previous attempt at fixing arduino#37 (which was reverted) would hide the
warning in these "normal" cases, but it ended up also hiding the message
in cases where it would be relevant (as [reported on the mailing
list][1]). Also, if for a single compilation some of these messages are
hidden, but others are not, this might cause users to draw incorrect
conclusions if they are not aware of the exceptions ("there must be only
one library for this header file, since I didn't see any message").
This commit takes a different approach: these messages are only shown when:
- The sketch fails to compile. In this case, the message is emitted as a
warning, shown in red in the IDE.
- Verbose compilation is enabled. In this case, the message is emitted
as informational, shown in white in the IDE.
This means that these message are either *all* shown, or *none* of them
are shown, which should make the behaviour more predictable. There is
still a chance that the "normal" messages described in arduino#37 confuse a
novice user when there is a compilation error completely unrelated to
the chosen libraries, but it is pretty impossible for arduino-builder to
know the cause of a failed compilation, so just showing all of these
messages on an error seems the best approach.
This fixesarduino#37 (again).
[1]: https://groups.google.com/a/arduino.cc/d/msg/developers/1kkIqIsbuzU/0-abwr1gBQAJ
Signed-off-by: Matthijs Kooijman <[email protected]>
0 commit comments