test(aot): build with (MSBuild)TreatWarningsAsErrors to catch warnings#5125
Draft
test(aot): build with (MSBuild)TreatWarningsAsErrors to catch warnings#5125
Conversation
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## deps/modules/sentry-native #5125 +/- ##
==============================================================
- Coverage 74.12% 74.00% -0.13%
==============================================================
Files 499 499
Lines 18067 18067
Branches 3520 3520
==============================================================
- Hits 13392 13370 -22
- Misses 3813 3838 +25
+ Partials 862 859 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
A fix is coming in sentry-native 0.13.6 - no need to change anything in sentry-dotnet. |
Projects using MSBuildTreatWarningsAsErrors=true would fail to publish with Native AOT due to warnings. Add a test to prevent such warnings slipping in. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fd2ff27 to
4980efa
Compare
Enable both TreatWarningsAsErrors and MSBuildTreatWarningsAsErrors in the main Aot publish test (all platforms) and drop the separate Windows-only MSBuildTreatWarningsAsErrors block. Portable PDBs make the original Windows-only scoping unnecessary, and reusing the existing test avoids a second publish while also exercising the resulting binary at runtime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on the PDB fix coming in sentry-native 0.13.6:
This PR turns on
(MSBuild)TreatWarningsAsErrorsfor the Native AOT integration test, to prevent such Native AOT warnings slipping in again in the future (mostly via sentry-native updates) that would make projects using(MSBuild)TreatWarningsAsErrorsfail to publish.See also: #5122
#skip-changelog