-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix inadvertently upgrading compiler warnings to errors in libs.native #114323
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
I noticed this while looking at an issue in the 9.0 branch with latest clang which runs into a couple warnings fixed in main with dotnet#108888. We intentionally don't set `-Werror` in release branches to avoid breaking the build when newer compilers add warnings via https://github.com/dotnet/runtime/blob/37e4d45236e68946db9d264593aa31a9c00534bc/eng/native/configurecompiler.cmake#L564-L567 However this didn't work because msbuild's WarnAsError was still reading the console output of the native build and upgrading any line with "warning: " to an msbuild error and breaking the build. Suppress this by setting IgnoreStandardErrorWarningFormat="true" on the Exec call. We already did this in the coreclr and mono runtime builds, we just missed it in libs.native.
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (3)
- src/coreclr/runtime.proj: Language not supported
- src/native/corehost/corehost.proj: Language not supported
- src/native/libs/build-native.proj: Language not supported
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
Since this suppression never worked and we are managing just fine without it, we can delete that instead? The compiler toolchain upgrades should be deterministic with new plan. |
|
@am11 well I hit this when my Xcode upgraded to the latest version and I tried to compile the 9.0 branch locally :) it's also important for source-build partners who don't use our CI setup, we've just been lucky they haven't hit a new warning in the libs.native code so far (the recent ones were Apple-specific) |
When build break is discovered, we have to fix them (either in code or by suppressing new warning) as several "fix build with new-msvc/clang/gcc" type of PRs merged previously. They are then backported to last release branch. Official builds aren't usually the first ones which discover these issues, so hiding them on official builds alone isn't saving much. |
The point is to not have warnings break the build in release branches, or needing to backport (harmless) warning fixes. |
I noticed this while looking at an issue in the 9.0 branch with latest clang which runs into a couple warnings fixed in main with dotnet#108888. We intentionally don't set `-Werror` in release branches to avoid breaking the build when newer compilers add warnings via https://github.com/dotnet/runtime/blob/37e4d45236e68946db9d264593aa31a9c00534bc/eng/native/configurecompiler.cmake#L564-L567 However this didn't work because msbuild's WarnAsError was still reading the console output of the native build and upgrading any line with "warning: " to an msbuild error and breaking the build. Suppress this by setting IgnoreStandardErrorWarningFormat="true" on the Exec call. We already did this in the coreclr and mono runtime builds, we just missed it in libs.native.
…14331) I noticed this while looking at an issue in the 9.0 branch with latest clang which runs into a couple warnings fixed in main with #108888. We intentionally don't set `-Werror` in release branches to avoid breaking the build when newer compilers add warnings via https://github.com/dotnet/runtime/blob/37e4d45236e68946db9d264593aa31a9c00534bc/eng/native/configurecompiler.cmake#L564-L567 However this didn't work because msbuild's WarnAsError was still reading the console output of the native build and upgrading any line with "warning: " to an msbuild error and breaking the build. Suppress this by setting IgnoreStandardErrorWarningFormat="true" on the Exec call. We already did this in the coreclr and mono runtime builds, we just missed it in libs.native.
I noticed this while looking at an issue in the 9.0 branch with latest clang which runs into a couple warnings fixed in main with #108888.
We intentionally don't set
-Werrorin release branches to avoid breaking the build when newer compilers add warnings viaruntime/eng/native/configurecompiler.cmake
Lines 564 to 567 in 37e4d45
However this didn't work because msbuild's WarnAsError was still reading the console output of the native build and upgrading any line with "warning: " to an msbuild error and breaking the build.
Suppress this by setting IgnoreStandardErrorWarningFormat="true" on the Exec call. We already did this in the coreclr and mono runtime builds, we just missed it in build-native.proj in libs.native.