-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Removes -Werror=all from cflags #7060
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this change. Some errors should be marked as warning instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the examples should be compile-able without warnings. Currently CI detects this due to this -Werror=all flag. If you remove it, you need to add it back somewhere during CI build to make sure that a new warning results in CI build failure.
For example, you can try adding this flag back during CI build by creating a platform.local.txt file before building the sketches (https://arduino.github.io/arduino-cli/0.21/platform-specification/#platformlocaltxt) |
Changed the PR to keep I tested it and this works with Arduino IDE that doesn't considers warnings as an error when building the sketch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@SuGlider as far as i understand the platform.local.txt file is supposed to be local — I.e. this is the file which the developer can create locally to adjust some build settings. |
One more request, please also check that a warning in one of the examples still causes CI to fail. |
I'd need to understand how the CI scripts work first. Another way to move forward, would be to change
|
I found warnings from |
I talked to @Ouss4 and I'll rework it further. |
It is now working as desired: We shall decide which warning flags should stay in CI. Suggestions are welcome. |
'tools/get.py', | ||
'tools/platform.local.txt', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this one required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this file changes, it means that cflags (any) have changed in CI building processs... really not sure if this is necessary.
Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache includes the toolchains and the Arduino IDE. The toolchains are unrelated to this.
As for the IDE, the question to ask is if platform.local.txt
will introduce new options that affect it. I think the answer is no, unless platform.txt
does so and we override them with platform.local.txt
. So I believe it's redundant.
That said, it doesn't really hurt to keep it, I'm just trying to understand if we really need it. A concern would be if we keep customizing it and invalidating the cache everytime for each PR that does so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we will change it for finishing this PR and we will not change it for a long while after that.
There may be a very small chance of need for changing something in the platform.local.txt
and not in the platform.txt
in the future, but as I said, I think it will be very rare.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platform.txt
is mainly intended to the Arduino end user and as base for CI.
tools/platform.local.txt
is only intended for CI, not used at all by the Arduino IDE.
One note, platform.txt file is generated by arduino-lib-builder: https://github.com/espressif/esp32-arduino-lib-builder/blob/29387059e8a15b7afb526bdfca9bb9f1c7d65b28/tools/copy-libs.sh#L459-L477. I think we should update the template used in arduino-lib-builder, otherwise the changes in platform.txt will be lost upon the next update. Edit: maybe what the script is doing is actually editing the previous platform.txt file; in which case it's probably fine to make the changes here. |
I'll also check it and make sure if we must change something there as well. |
related to issue espressif#7024
BTW, is the plan to then fix all the warnings? Will this be part of this PR? |
Issue update: This PR needs more investigation and proper testing so it's not visible for 2.0.5 milestone. |
Yes, we shall fix all the warning, maybe in separated PRs along time, before merging this one. |
@@ -48,6 +48,9 @@ else | |||
git clone --recursive https://github.com/espressif/arduino-esp32.git "$PLATFORMIO_ESP32_PATH" > /dev/null 2>&1 | |||
fi | |||
|
|||
echo "Copying CI restrictive warning settings from tools/platform.local.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PIO does not use any Arduino configuration file.
compiler.common.w_flags=-Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-error=unused-but-set-variable | ||
|
||
# | ||
# ESP32S2 Support Start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESP32, not ESP32S2
what is the point of splitting the flags in such way? They are taken from ESP-IDF and filled in |
What is "CI"? |
Continuous integration (CI) automatically builds, tests, and integrates code changes within a shared repository. |
What is keeping us from making progress on this PR? What examples need to be fixed? |
@SuGlider closing this for now. we can loo into better implementation on the current platform later |
Description of Change
-Werror=all
creates some issues when used, which are not desirable.Erroring out those warning-errors sometimes is too hard and not really important for Arduino users.
Most other Arduino platform do not set this cflag.
Tests scenarios
See issue #7024
Related links
Closes #7024