xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.42k stars 507 forks source link

Do not suppress trim analysis warnings when NativeAOT is enabled #20763

Closed simonrozsival closed 4 days ago

simonrozsival commented 1 week ago

We noticed we weren't seeing trim analysis warnings in VS Code when PublishAot was set to true. There was a recent change that correctly disabled the suppressions when TrimMode is full. We need to make sure that we're also getting the trim analysis warnings in dotnet build with PublishAot but suppress them when publishing (in that case the warnings will come later from ILC). This PR aligns the behavior of PublishAot=true and TrimMode=true in debug builds.

/cc @ivanpovazan @rolfbjarne @jonathanpeppers

simonrozsival commented 1 week ago

@ivanpovazan I revisited the approach, please have a look at the new code

github-actions[bot] commented 1 week ago

:warning: Your code has been reformatted. :warning:

If this is not desired, add the actions-disable-autoformat label, and revert the reformatting commit.

If files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).

ivanpovazan commented 4 days ago

/azp run

azure-pipelines[bot] commented 4 days ago
No pipelines are associated with this pull request.
simonrozsival commented 4 days ago

Closing in favor of https://github.com/xamarin/xamarin-macios/pull/20767