fix: suppress IL2026/IL2104/IL2121 trim analysis warnings on TodoApp.Uno browserwasm/ios/maccatalyst#548
Merged
Conversation
…Uno browserwasm/ios/maccatalyst Now that CommunityToolkit#533 fixes the TodoApp.Uno build failure, these three heads build successfully in CI for the first time and surface IL trim-analyzer warnings that were previously masked. dotnet build enables the trim analyzer on these SDKs by default, but this CI pipeline only ever runs 'dotnet build', never 'dotnet publish -p:PublishTrimmed=true', so the warnings are diagnostic noise on framework APIs (EF Core's DbContext ctor, JsonSerializer.Serialize, Uno's own Hosting/Navigation surface and source-generated BindableMetadata.g.cs), not sample bugs. Same fix pattern as CommunityToolkit#531 (TodoApp.Avalonia/TodoApp.MAUI): add SuppressTrimAnalysisWarnings, scoped via GetTargetPlatformIdentifier to match TodoApp.MAUI.csproj's existing convention. android/desktop/windows did not surface these warnings in the CI run linked from the issue, so they are intentionally left unsuppressed. Verified locally: - net10.0-desktop: restore + build clean (no workload required). - net10.0-browserwasm: restore + build clean after installing the wasm-tools workload into a separate user-writable .NET SDK (system-wide SDK is root-owned in this environment). Confirmed via negative control (reverting the change) that IL2026/IL2104/IL2121 appear 18 times without the fix and 0 times with it, on an otherwise identical build. - Root Datasync.Toolkit.sln (unaffected by this change) still restores and builds clean; Client.Test passes 1432/1432. Live server DB tests fail in this sandbox due to no Docker daemon (pre-existing environment limitation, unrelated to this change). Not verified locally (relying on CI, same limitation noted in CommunityToolkit#531/CommunityToolkit#533): - ios / maccatalyst: require a full Xcode install (only Command Line Tools available here). - android: requires the Android SDK/workload. - windows: requires a Windows runner. Fixes CommunityToolkit#534
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.
Summary
Now that #533 fixes the
TodoApp.Unobuild failure, thebrowserwasm,ios, andmaccatalystheads build successfully in CI for the first time - and surface IL trim-analyzer warnings (IL2026/IL2104/IL2121) that were previously masked by the build failure.dotnet buildenables the trim analyzer on these SDKs by default, but this CI pipeline only ever runsdotnet build, neverdotnet publish -p:PublishTrimmed=true, so the warnings are diagnostic noise on framework APIs (EF Core'sDbContextctor,JsonSerializer.Serialize, Uno's ownHosting/Navigationsurface and source-generatedBindableMetadata.g.cs), not bugs in the sample.Same fix pattern as #531 (
TodoApp.Avalonia/TodoApp.MAUI): addSuppressTrimAnalysisWarnings, scoped via the sameGetTargetPlatformIdentifier-conditional pattern already used inTodoApp.MAUI.csproj, to the three confirmed-affected TFMs.android/desktop/windowsdid not surface these warnings in the CI run linked from the issue, so they are intentionally left unsuppressed for now.Fixes #534
Verification
net10.0-desktop:dotnet restore/buildclean, no workload required - confirms the change doesn't regress unrelated heads.net10.0-browserwasm:dotnet restore/buildclean after installing thewasm-toolsworkload into a separate user-writable .NET SDK (system-wide SDK is root-owned in this environment).Datasync.Toolkit.sln(unaffected by this change,TodoApp.Unoisn't part of it): restores/builds clean.CommunityToolkit.Datasync.Client.Testpasses 1432/1432.CommunityToolkit.Datasync.Server.TestLive DB suites (AzureSQL/PgSQL/MongoDB/CosmosDB) fail in this sandbox due to no Docker daemon - a pre-existing environment limitation unrelated to this change.Not verified locally (relying on CI, same limitation noted in #531/#533):
ios/maccatalyst: require a full Xcode install (only Command Line Tools available here).android: requires the Android SDK/workload.windows: requires a Windows runner.