fix: suppress MT7156 duplicate BundleResource warnings on TodoApp.Uno ios/maccatalyst#569
Merged
Merged
Conversation
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
The
ios-maccatalysthead ofTodoApp.UnoemitsMT7156warnings about duplicateBundleResourceitems during build:Fixes #541
Root cause
Uno.Resizetizer(unoresizetizer) rasterizes each SVG-sourced asset (Assets/Icons/icon_foreground.svg,Assets/Images/back.svg,Assets/Splash/splash_screen.svg) into both an unscaled base PNG and an explicitscale-100variant. Onios/maccatalyst, both collapse to the sameBundleResourceLogicalName, because Apple's bundling convention treats an unscaled asset and its1x/scale-100counterpart as identical — so one copy is silently dropped. The build still succeeds and the icon/splash render correctly; this is a warning about redundant bundling, not a missing or broken asset.This is not a duplicate-inclusion bug in this project's
Assetswiring:TodoApp.Uno.csprojhas no explicitUnoIcon/UnoSplashScreen/UnoImageitems — Uno.Sdk's Single Project convention auto-wiresAssets/Icons/*.svg,Assets/Splash/*.svg, andAssets/Images/*.svginto the resizetizer pipeline implicitly, and this dual base+scale-100 emission on Apple TFMs is inherentUno.Resizetizeroutput, confirmed by inspecting the CI job log directly (bothnet10.0-iosandnet10.0-maccatalystTargetFrameworks affected, for exactly the same three assets).Why suppress rather than change the resource pipeline
This repo's CI only ever runs
dotnet buildforTodoApp.Uno(never publishes/packages the app), so the redundant bundling has no functional consequence in this pipeline. Attempting to reconfigure theUnoImage/UnoIcon/UnoSplashScreenpipeline to avoid the redundantscale-100copy would require visual verification on an iOS/macCatalyst simulator (no Xcode available in this sandbox) and risks inadvertently affecting the Android/Windows heads, which legitimately need multiple scale variants from the same SVG sources.Same fix pattern as #531/#548 (
SuppressTrimAnalysisWarningsfor the equivalent IL2026/IL2104 trim-analyzer noise): suppress the specific, confirmed-benign warning code via a precisely scoped MSBuild property, with a comment documenting the root cause.Changes
samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj:MSBuildWarningsAsMessagesfor warning codeMT7156, scoped toios/maccatalystonly via the same$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))conditional pattern already used forSuppressTrimAnalysisWarningsin this file.android/desktop/browserwasm/windowsare intentionally left untouched — the CI job log confirmsMT7156(an Apple-toolchain-specific code) only ever appears onios/maccatalyst.Verification
ios-maccatalystjob log from the currentmainHEAD (ddd8c04, before this fix) against this branch's CI run.main'sios-maccatalystjob log shows 20MT7156occurrences.ios-maccatalystjob log shows 0MT7156occurrences, and the job still succeeds.IL2026occurrences (a separate, pre-existing trim-analyzer finding from TodoApp.Uno: trim analysis warnings (IL2026/IL2104/IL2121) on browserwasm/ios/maccatalyst heads #534/fix: suppress IL2026/IL2104/IL2121 trim analysis warnings on TodoApp.Uno browserwasm/ios/maccatalyst #548, out of scope here and unaffected by this change either way) — confirming this fix is scoped precisely toMT7156and doesn't mask or interact with anything else.net10.0-desktop:dotnet restore/buildclean, no workload required — confirms the change doesn't regress unrelated heads.net10.0-browserwasm: could not verify locally (installing thewasm-toolsworkload requires elevated privileges in this sandbox, same limitation noted in fix: suppress IL2026/IL2104/IL2121 trim analysis warnings on TodoApp.Uno browserwasm/ios/maccatalyst #548); covered by CI instead (job succeeded, unaffected).Datasync.Toolkit.sln(unaffected by this change,TodoApp.Unoisn't part of it): restores/builds clean (0 Warning(s),0 Error(s)).CommunityToolkit.Datasync.Client.Testpasses 1432/1432.build-samples.ymlon the fork (adrianhall/CommunityToolkit-Datasync, refissues/541) — all 17 jobs succeeded, includingtodoapp-uno / ios-maccatalystand theAll samples builtaggregation gate. Run: https://github.com/adrianhall/CommunityToolkit-Datasync/actions/runs/29150182538Not verified locally (relying on CI, same limitation noted in #531/#548):
ios/maccatalyst: require a full Xcode install (only Command Line Tools available here).android: requires the Android SDK/workload.windows: requires a Windows runner.