From 51dae3b1621476b9227f0bbb801cb632670926ac Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 24 Oct 2024 14:40:48 +0200 Subject: [PATCH] [dotnet] Stop suppressing trim analysis warnings. Fixes #21293. (#21351) Our own code shouldn't produce trim analysis warnings anymore (see #10405), so we don't need to suppress trim analysis warnings for everyone. Except: we still want to suppress trim analysis warnings if no assemblies are trimmed, because otherwise we'll get warnings for code that would otherwise be trimmed away. On the other hand, we want trim analyzer always enabled, so that warnings are reported for user code. The difference between "trim analyzer" and "trim analysis warnings" is that the former is an analyzer that analyzes the currently compiled code (which we always want), while the latter is reported by the trimmers, and as such will report warnings from *all* code, including all references. This also required bumping Touch.Unit and MonoTouch.Dialog. * New commits in xamarin/MonoTouch.Dialog: * xamarin/MonoTouch.Dialog@d157950 Exclude code that's not trimmer safe. Diff: [77b3337..d157950](https://github.com/xamarin/MonoTouch.Dialog/compare/77b3337dbbc9e3e2f1b06dab3d37d2822488b0b3..d157950b6e6ed32cf53d4074fe19223dc1f1e8fe) * New commits in xamarin/Touch.Unit: * xamarin/Touch.Unit@957faca [Touch.Client] Disable features that aren't trimmer safe. Diff: [92a0726..957faca](https://github.com/xamarin/Touch.Unit/compare/92a072683b69b2f61f235a7a249c2c7f261236d4..957facad80e753310f52fcbb8cf85219d9d6d887) Fixes https://github.com/xamarin/xamarin-macios/issues/21293. --- dotnet/targets/Xamarin.Shared.Sdk.Trimming.props | 11 +++++++---- external/MonoTouch.Dialog | 2 +- external/Touch.Unit | 2 +- tests/common/shared-dotnet.csproj | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props index 9cdbf75630d0..970792a6a39c 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props @@ -81,9 +81,12 @@ --> <_OriginalSuppressTrimAnalysisWarnings>$(SuppressTrimAnalysisWarnings) true - - false - false - true + + + true + false + + + true diff --git a/external/MonoTouch.Dialog b/external/MonoTouch.Dialog index 77b3337dbbc9..d157950b6e6e 160000 --- a/external/MonoTouch.Dialog +++ b/external/MonoTouch.Dialog @@ -1 +1 @@ -Subproject commit 77b3337dbbc9e3e2f1b06dab3d37d2822488b0b3 +Subproject commit d157950b6e6ed32cf53d4074fe19223dc1f1e8fe diff --git a/external/Touch.Unit b/external/Touch.Unit index 92a072683b69..957facad80e7 160000 --- a/external/Touch.Unit +++ b/external/Touch.Unit @@ -1 +1 @@ -Subproject commit 92a072683b69b2f61f235a7a249c2c7f261236d4 +Subproject commit 957facad80e753310f52fcbb8cf85219d9d6d887 diff --git a/tests/common/shared-dotnet.csproj b/tests/common/shared-dotnet.csproj index 2b46011e8e0e..24df183f9c5b 100644 --- a/tests/common/shared-dotnet.csproj +++ b/tests/common/shared-dotnet.csproj @@ -81,6 +81,8 @@ false $(NoWarn);IL2104 + + true