Repository navigation
fix(generator): Alias _View to UIElement on every target - #24457
Conversation
|
Claude finished @MartinZikmund's task in 46s —— View job Review complete ✅Verdict: Approve — no blocking issues found. This is a tightly-scoped, well-justified fix. Summary of what I checked:
Not independently re-run: the generator test suite itself (author notes local SDK mismatch — No inline comments posted — I found nothing to flag. |
There was a problem hiding this comment.
🟡 Changes recommended
The code change looks correct, but the PR description needs a required linked GitHub issue (Fixes/Closes/Related) per repo policy before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes a generator/emitted-code mismatch by making the _View alias always resolve to Microsoft.UI.Xaml.UIElement, which matches the Uno.UI.FrameworkTemplateBuilder delegate return type and avoids invalid method-group conversions on mobile TFMs when HAS_UNO_SKIA is not defined.
Changes:
- Simplify
_Viewalias emission inXamlFileGenerator.csto a single unconditionalUIElementalias. - Update XAML generator snapshot baselines to reflect the collapsed alias block (removing the
#if HAS_UNO_SKIA/ native view branches).
Process note: The PR description currently doesn’t include a Fixes/Closes/Related to https://github.com/unoplatform/<REPO>/issues/#<ISSUE_NUMBER> footer; repo policy requires linking an issue (or explicitly noting “No related issue …”).
File summaries
| File | Description |
|---|---|
| src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs | Emit _View alias as Microsoft.UI.Xaml.UIElement unconditionally. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Xuid/WhXuBa/XamlCodeGenerator_ContentDialog1_7987c32aca55089a14f8c6c711f92359.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_TemplateSettings/WhTeHaNoDeObCo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/WhTyXaCoReReDi/XamlCodeGenerator_MyResourceDictionary_147dbe765eba23608d8cd771f768c620.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/WhTyReDiRoWiRe/XamlCodeGenerator_MyResourceDictionary_147dbe765eba23608d8cd771f768c620.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/WhNeWiSiReAnEv/XamlCodeGenerator_RD_WNWSRAE_656341a3c9e6d4b4357d06ec15ae6fce.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/TeTwLeNeMeDiWiTwReDi/XamlCodeGenerator_MyResourceDictionary_147dbe765eba23608d8cd771f768c620.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/TeTwLeNeMeDiWiSiReDi/XamlCodeGenerator_MyResourceDictionary_147dbe765eba23608d8cd771f768c620.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/TeThLeNeMeDi/XamlCodeGenerator_MyResourceDictionary_147dbe765eba23608d8cd771f768c620.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/TeReDiAsAtPrShSeThPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_RelativeUri/WhReUrIsRe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_RelativeUri/WhReUrInSe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhVePr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhSkXmNa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhNeSe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhNaIsOnNeEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhMuWiIn/XamlCodeGenerator_ThirdPage_475d8edc4495de5bdb45b5c730a5c2f2.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhMuWiIn/XamlCodeGenerator_SecondPage_6b0363415e35aa5099bd5c22ab91d5f0.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhMuWiIn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhKeAcKePr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInXm/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInRo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInPoVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInObPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInObNo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInMeNo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInMaVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInGrLeVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInElPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInDoVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInCoRaVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhIn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhEvOnToLeNoDeOb/XamlCodeGenerator_MainWindow_35b16a7cd4c5f6ba316b074a0da7f8d9.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhEvHa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhAtDP_InTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoRoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoReDiNeMeOK/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoImReDiRo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoExReDiRo/XamlCodeGenerator_MyRD_77da33433823c3123d21641a41765572.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoDaTeRo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoDaTeNeMeOK/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0907_xNaLo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaMuInEnVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaInEnVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa003/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa002/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001_InReSoPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001_InReSoMo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001_BiEr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmUs/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmUn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmInSc/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmIg/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_NoFuzzyMatching/TeViBoPa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_NoFuzzyMatching/TeTyPrWiXSt/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPAE_name/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPAE_m_name/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPAE__name/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPADNE/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WNBOP/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WBOP/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtensionNameProperty/WhMaExNaOnLaEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtensionNameProperty/WhMaExNaMaViStSeTa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtensionNameProperty/WhElTyHaCoExCl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeNuMaExInRePr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeNuMaExInAtPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeMaExWiShWiAc/XamlCodeGenerator_MainWindow_35b16a7cd4c5f6ba316b074a0da7f8d9.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeMaExWiShFrElLo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeCoAnCoExInSaNa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_LazyLoading/WhLoChHaBi/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_LazyLoading/WhDeLoStNoViSe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ImplicitXamlNamespaces/WhAmTyInGlNa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoNoSeFoReFrSo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoKeThPaVeInThEmLi/XamlCodeGenerator_Ma_in_Pägé_c557fd15e80a75bdd79cae415a71aa3d.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoTyReDi/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoReTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoReDiFi/XamlCodeGenerator_OtherDictionary_218afd2e503a1577f4ce46cd7f3fc921.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoReDiFi/XamlCodeGenerator_MyDictionary_b31577bd88a443cc7e422162f7097e83.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoPaLeSt/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoPaLeRe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoExReDi/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInInOuFoEmDaTe/XamlCodeGenerator_EmptyDataTemplatePage_14a64d66c7071a2b54a8c9a36712e00c.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInInOuFoDeObThArFrEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeBaUrInInOuFoFrEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/ReDiCoBe/XamlCodeGenerator_MyDictionary_b31577bd88a443cc7e422162f7097e83.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HoistedResourceOwner/WhCuMaExInLaReInTe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HoistedResourceOwner/WhCuMaExInLaRe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsNeSuSy/XamlCodeGenerator_Grid_Uses_New_Succinct_Syntax_0b49a2c98bcf0a7403d6de3124559ba4.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsNeAsCoPrSy/XamlCodeGenerator_Grid_Uses_New_Assigned_ContentProperty_Syntax_b80fca056e1bf6bae00bca0b4dfe18d7.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsCoSy/XamlCodeGenerator_Grid_Uses_Common_Syntax_c1be4430470ec234df472eb5ce9cbaaf.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsBoSy/XamlCodeGenerator_Grid_Uses_Both_Syntaxes_5d0366ecb133af4c31f7d61373b58fb4.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_GenerateEmbeddedXamlSources/EsTrQu/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_GenerateEmbeddedXamlSources/EsNQu/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhXaObWiXaObPr/XamlCodeGenerator_Binding_Xaml_Object_With_Xaml_Object_Properties_13ccd64bb03497e9fbd3d015c5d7874a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhXaObWiCoPr/XamlCodeGenerator_Binding_Xaml_Object_With_Common_Properties_32c9951cc1e205007e0c313480b9e8bf.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhStXBiPrInDaTeWiDaTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhStXBiEvInDaTeWiDaTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhBiElNaInTe/XamlCodeGenerator_Binding_ElementName_In_Template_d9353a41d6883de0ddf51bf7c4e43f1e.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeXBiReXLoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeTwWa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeTeInXLoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeReSoShSy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeReSoFuXmSy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeReSoExSy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TePaXBiReXLoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeInMe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeInDeFrAn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeDeBiMoInDaTeInReDi/XamlCodeGenerator_MyResourceDictionary_147dbe765eba23608d8cd771f768c620.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeBaTyNoSpInCoBe/XamlCodeGenerator_UserControl1_32e87d7058152b347bbc5c24e16f8b3c.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeBaTyNoSpInCoBe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeAcAr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Snapshot update: remove conditional/native _View alias block. |
Review details
- Files reviewed: 1/112 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24457/wasm-skia-net9/index.html |
|
|
|
Claude finished @MartinZikmund's task in 55s —— View job Review completeVerdict: Approve — no blocking issues found. No inline comments posted.
What I checked:
Cross-cutting notes:
|
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, aligns generator output with the actual FrameworkTemplateBuilder contract, and the necessary snapshot/span updates are included.
Review details
- Files reviewed: 5/116 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
|
e6fa36b to
792a462
Compare
|
Claude finished @MartinZikmund's task in 1m 18s —— View job Review completeVerdict: Approve — no blocking issues found. No inline comments posted.
Independently verified:
Cross-cutting notes (not blocking, but worth eyes before merge):
|
There was a problem hiding this comment.
🟢 Approval recommended
The functional change is narrow and well-justified (fixes a real downstream compile failure), with only a minor test-comment coordinate mismatch to optionally clean up.
Review details
- Files reviewed: 5/116 changed files
- Comments generated: 1
- Review effort level: Lite
|
Claude finished @MartinZikmund's task in 1m 29s —— View job Reviewing PR #24457
Verdict: Approve — no blocking issues found. No inline comments posted.Independently verified (not just re-reading prior review comments):
Cross-cutting note (not blocking): the linked-GitHub-issue policy note from the automated Copilot review (PR description has no |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to generator output correctness and corresponding snapshot/test expectation updates, with no functional regressions identified in the reviewed diffs.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs:350
- Regression coverage: the generator previously emitted different
_Viewaliases based on preprocessor symbols, and the failure only reproduces whenHAS_UNO_SKIAis not defined but__ANDROID__/__IOS__is. The current snapshot tests update the text but still don’t exercise compilation under those symbol sets, so a future regression could slip through again. Consider adding a unit test that runs the generator withPreprocessorSymbolsincluding__ANDROID__and separately__IOS__(and withoutHAS_UNO_SKIA) and asserts the generated sources compile.
- Files reviewed: 5/116 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟢 Approval recommended
The generator change is narrowly scoped, aligns _View with the actual FrameworkTemplateBuilder return type, and the accompanying snapshot/test expectation updates reflect the resulting deterministic output.
Review details
- Files reviewed: 5/116 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24457/wasm-skia-net9/index.html |
Uno 7.0 removed native view rendering, but the XAML generator still emitted a
platform-conditional alias for `_View`:
#if HAS_UNO_SKIA
using _View = Microsoft.UI.Xaml.UIElement;
#elif __ANDROID__
using _View = Android.Views.View;
#elif __APPLE_UIKIT__ || __IOS__ || __TVOS__
using _View = UIKit.UIView;
#else
using _View = Microsoft.UI.Xaml.UIElement;
#endif
`_View` is the return type of every generated FrameworkTemplate builder, and
those builders are converted to `Uno.UI.FrameworkTemplateBuilder`, which
returns `UIElement`. In 7.0 `UIElement` derives from `DependencyObject` and
has no relationship to `Android.Views.View` or `UIKit.UIView`, so whenever one
of the two native branches is taken the method-group conversion fails:
error CS0407: 'View GlobalStaticResources...Build_..._ConTem(
object, TemplateMaterializationSettings)' has the wrong return type
Both native branches are dead: Uno.WinUI 7.0 ships no android or ios assembly,
so they can only ever produce output that does not compile.
They are still reachable downstream. `HAS_UNO_SKIA` comes from
Uno.WinUI.Runtime.Skia.Android/.AppleUIKit, which ship it from `build/` rather
than `buildTransitive/`, so it applies to a direct reference only — and the
Uno SDK adds that reference with `PrivateAssets="all"`. Every Uno.Sdk project
therefore takes the first branch, which is why CI never sees this, while a
plain `Microsoft.NET.Sdk` library referencing Uno.WinUI on a mobile target
framework cannot compile any XAML template at all.
Collapse the block to the single alias that is correct everywhere. The two
branches that are actually taken today already emit exactly this line, so no
configuration that builds today changes a single generated character.
Verified: forcing `HAS_UNO_SKIA` on the affected library downstream
(Uno.Simple.WinUI in uno.themes, net10.0-android) takes the error count from
4 CS0407 to 0, which isolates the alias as the cause.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
Collapsing the `_View` alias block from 9 lines to 1 shifted every line of
generated XAML output up by 8. The 111 expected-output files were regenerated,
but eight `WithSpan(...)` assertions hard-code line numbers *into* that
generated file from test source, and those were missed:
Expected diagnostic to start on line "76" was actually on line "68"
Five tests fail as a result — When_ObservableProperty_AttributeDoesNotExists,
When_Ambiguous_Type_In_Global_Namespaces, When_Invalid_Member_Node,
When_Invalid_Object_Node and When_Grid_Uses_Both_Syntaxes.
Shift the eight generated-file spans by 8. Spans pointing at the XAML input or
at the user's own C# are unaffected and left alone.
Verified locally on the net11 preview SDK: 493 tests, 5 failed before, 0 after.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSKHVLNtHS6yTB5V3ww3d7
The github-code-quality analyzer flags every multi-argument Path.Combine
on the WithSpan expected-diagnostic paths ("may silently drop its earlier
arguments"). The arguments here are constant relative literals, so none
can be rooted, but Path.Join carries no rooted-reset semantics at all and
emits the same string.
Not a hardcoded '/' literal, as one of the analyzer suggestions proposed:
the generated document path uses the host separator, so a literal would
break these assertions on Windows.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmoGiAqxB74J2xwvHz2qqu
The span realignment updated two of the three CS1061 reference comments in this block; the third still named (124,252) while its assertion targets 116,254. The column was already off by two before the realignment. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MmoGiAqxB74J2xwvHz2qqu
2641028 to
e087ab2
Compare
|
Claude finished @MartinZikmund's task in 35s —— View job Review completeVerdict: Approve — no blocking issues found. No inline comments posted.
What changed since the last review round: exactly one new commit, No other files changed in this push. Everything from the prior review rounds still holds:
Cross-cutting note (unchanged from prior rounds): I can't execute the generator test suite in this environment; the author has reported it green locally (493 tests / 0 failed) on the CI-pinned .NET 11 preview SDK. Worth confirming the latest CI run is green before merging. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is a targeted generator correctness fix with consistent snapshot/test updates and no remaining stale _View conditional aliases in the checked-in expected outputs.
Review details
- Files reviewed: 5/116 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24457/wasm-skia-net9/index.html |
|
|
|
Tick the box to add this pull request to the merge queue (same as
|
`Uno.ShowMeTheXAML` 3.0.0-dev0001 depends on `Uno.WinUI` >= 7.0.0-dev.684,
so pinning the SDK at 7.0.0-dev.679 fails every head at restore:
error NU1605: Detected package downgrade: Uno.WinUI from 7.0.0-dev.684
to 7.0.0-dev.679
7.0.0-dev.697 also carries the XAML generator fix from unoplatform/uno#24457,
which clears the CS0407 `_View` return-type errors that blocked
`Uno.Simple.WinUI` on net10.0-android and net10.0-ios. Verified the fix is in
this package: its nuspec pins commit ee8ffda8, and the PR's merge commit
d5b9af48 is an ancestor of it.
Both `global.json` files move together, since the nested one governs a sample
head built directly, which is what CI does.
Verified by publishing the Material desktop head with the CI command: 0 errors.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
`Uno.ShowMeTheXAML` 3.0.0-dev0001 depends on `Uno.WinUI` >= 7.0.0-dev.684,
so pinning the SDK at 7.0.0-dev.679 fails every head at restore:
error NU1605: Detected package downgrade: Uno.WinUI from 7.0.0-dev.684
to 7.0.0-dev.679
7.0.0-dev.697 also carries the XAML generator fix from unoplatform/uno#24457,
which clears the CS0407 `_View` return-type errors that blocked
`Uno.Simple.WinUI` on net10.0-android and net10.0-ios. Verified the fix is in
this package: its nuspec pins commit ee8ffda8, and the PR's merge commit
d5b9af48 is an ancestor of it.
Both `global.json` files move together, since the nested one governs a sample
head built directly, which is what CI does.
Verified by publishing the Material desktop head with the CI command: 0 errors.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
* Version bump after 7.0 release branch (#1686) * docs: add v7 migration section to upgrading guide (#1690) * docs: add v7 migration section to upgrading guide * docs: simplify sections * docs: remove unecessary mentions * docs: fix for linter * Version bump after 7.1 release branch (#1691) * feat(samples): host all theme sample apps in one ThemesSampleApp wrapper head (#1693) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]> * docs(samples): link filed upstream issues from ALC teardown sweeps (#1696) Co-authored-by: Claude Opus 5 (1M context) <[email protected]> * feat: Color Fidelity (#1697) Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]> * feat!: add DefaultSpacing base unit and make Density a pure mode (#1701) Co-authored-by: Claude Fable 5 <[email protected]> * feat: add instance-based Application.GetTheme() extension (#1699) Co-authored-by: Claude Fable 5 <[email protected]> * ci: Build and publish from servicing/* branches A servicing/* branch continues a previous version line after master has moved on to a newer one, so it needs to build and publish dev packages the same way master does. Adds servicing/* to the build and PR triggers, the Publish_Dev stage condition, the dev-feed push step and the NBGV publicReleaseRefSpec. Every change is an additional branch pattern inside an existing or(), so master's own behaviour is unchanged. This already exists on servicing/7.2, which is how it publishes today. Bringing it to master makes the pattern canonical, so the next servicing branch inherits it instead of having to rediscover the edits. * ci: Validate conventional commits on servicing/* branches 'Validate Conventional Commits' is a required status check on master. Adding servicing/* here is a prerequisite for giving servicing branches the same branch protection as master -- without it the check never reports and a PR into a servicing branch could never be merged. * feat!: collapse the root typeface tokens into a single DefaultFontFamily (#1710) Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]> Co-authored-by: Derek Raven <[email protected]> * feat(themes): add DefaultFontFamily to BaseTheme and re-resolve the font override Stack 2/2 — sits on the single-typeface token collapse (feat!: collapse the root typeface tokens into a single DefaultFontFamily). Closes #1705. - DefaultFontFamily DP on BaseTheme: one FontFamily generates the DefaultFontFamily root token and all 19 type-scale *FontFamily keys (GenerateFontFamilyScale + ThemesConstants.TypefaceScaleKeys), plus each design system's own per-control *FontFamily aliases (FontFamilyAliasKeys on MaterialTheme/SimpleTheme), under Default/Light/HighContrast - the font override is resolved in UpdateSource() and merged last; a URI-backed override is re-read from its Source when a hot reload invalidates it, so edits reach the theme (fixes #1705) while unrelated rebuilds reuse the resolved copy; duplicated merge removed from MaterialTheme/SimpleTheme - override load/re-read fallbacks emit a guarded LogWarning with the URI - SemanticThemeHelper.DefaultFontFamily accessor - FontFamilyTunerControl on the Design Tokens page sets the family on the running theme and restyles already-rendered text via a RequestedTheme flip - runtime tests: Given_DefaultFontFamily (generation, alias keys, every SharedTypography slot, appearance coverage, unset/clear/replace, override precedence, #1705 re-resolution through the hot-reload entry point), Given_FontFamilyTuner - design-tokens doc: property row + property-based Typography Font Swap Adapted to the single-token base: the generator emits DefaultFontFamily instead of the removed TypefacePlain/TypefaceBrand pair, and the tuner offers variable-font entry points so *FontWeight tokens keep resolving. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BJokqo5p49ysm5TtcanEWt Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01ER3xjPyWwDRhiBmYgPojMu * fix(simple): resolve button typeface aliases through ThemeResource - `SimpleButtonFontFamily` / `SimpleToggleButtonFontFamily` are regenerated by the `DefaultFontFamily` layer, but the Button and ToggleButton setters read them with `{StaticResource}`, which resolves once at parse time: the keys followed the property while the rendered controls stayed on Inter. - Switch the four setters to `{ThemeResource}`, matching every other `*FontFamily` setter in Material v2 and Simple (`DatePickerFlyoutPresenterFontFamily` was already correct). - Add `Given_DefaultFontFamily.When_DefaultFontFamilyChanges_Then_StyledButtonFollows`, asserting the rendered `FontFamily` on a Button and a ToggleButton — red before the fix, green after; a token lookup cannot see this gap. - Record the seam rule in `specs/lessons.md` and the fix in the spec 09 progress notes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Gjq1PTgqHq3BtLLJbwiguk * fix(simple): declare the button typeface aliases inside ThemeDictionaries SimpleButtonFontFamily and SimpleToggleButtonFontFamily were declared at the top level of Button.xaml / ToggleButton.xaml, so the generated font layer could not reach them and a runtime DefaultFontFamily change left them on their parse-time snapshot. BaseTheme sets its own Source to mergedpages.xaml (BaseTheme.cs:505), so a top-level key there is one of the theme dictionary's own resources — and own resources beat MergedDictionaries. The generated layer arrives through AddThemeDictionary, i.e. merged, so it can shadow a themed declaration but never a non-themed one. DatePickerFlyoutPresenterFontFamily passed the same test because it is declared themed, as are all twelve of Material's alias keys. Declaring both aliases in the Light and Default blocks the two files already have puts them where the generated layer can shadow them. Mirroring the aliases into the generated dictionary's top level was tried first and does not work — that dictionary is merged; its non-themed entries lose to the theme's own. Depends on 0f9976c: with the setters still on {StaticResource} this move would have left a parse-time reference dangling. All four consumers now use {ThemeResource}, so the two commits are complementary halves. Simple runtime tests, net10.0-desktop Release headless: 256 cases, 255 passed, 0 failed, 1 pre-existing skip (was 253/2/1). No new warnings. * fix(themes): read generated spacing and shape tokens through ThemeResource - Simple and Material v2 control styles read the runtime-generated `Space*` / `Radius*` tokens — directly or through per-control aliases such as `SimpleButtonCornerRadius` and `MaterialContentDialogPanelPadding` — with `{StaticResource}`, which snapshots at parse time, so a runtime `DefaultSpacing` / `DefaultDensity` / `DefaultCornerRadius` change regenerated the tokens but never reached a control. - Rewrite all 98 such reads (78 Simple, 20 Material v2; 22 files) to `{ThemeResource}`, found by an alias-closure sweep rooted at the generated keys. Density constants are fixed values and are left as they are. - Add `Given_DesignTokens.When_ScaleMeasuresChangeAtRuntime_Then_RealizedButtonFollows` (Simple head) and `…_RealizedContentDialogFollows` (Material head): red before, green after, both against the application theme and restored in `finally`. - `doc/design-tokens.md`: the scale measures are runtime-settable, with the already-realized caveat and the theme-change-pass route, matching `DefaultFontFamily`. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gjq1PTgqHq3BtLLJbwiguk * ci: Set version to '9.0-dev.{height}' Uno.Themes 8.0 has not shipped a stable release yet, so the 8.0 line stays open on servicing/8.0 for the Uno 6.x-compatible packages. master moves to 9.0 for the Uno Platform 7.0 retarget, which is binary breaking. * chore!: Target Uno.Sdk.Private 7.0 and net10.0 BREAKING CHANGE: library target frameworks move from net9.0 to net10.0. Consuming apps must target .NET 10 or later. Move every library project from `Uno.Sdk` to `Uno.Sdk.Private`, since no public `Uno.Sdk` 7.x exists yet, and pin `7.0.0-dev.679` — the same build `uno.toolkit.ui` targets, so the two libraries agree on the Uno surface. Both `global.json` files have to move together. `src/samples/global.json` is the one that governs a sample head built directly (`dotnet publish src/samples/<head>`, which is what CI runs); the root file only governs a solution build, where the SDK is resolved from the entry point. Leaving the nested file on 6.7.0-dev.815 built the libraries against Uno 7 and the sample heads against Uno 6. `7.0.0-dev.679` is published to the shared `unoplatformdev` feed, so no additional package source is required. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * fix!: Retarget Uno.UI.Toolkit namespaces for BC53 BREAKING CHANGE: the `Uno.UI.Toolkit` xmlns is gone. XAML copied from these styles must use `using:Uno.UI.Xaml.Controls` for `ElevatedView` and `CommandBarExtensions`, `using:Uno.UI.Behaviors` for `VisibleBoundsPadding`, and `using:Uno.UI.Xaml` for `UIElementExtensions`. Uno 7.0 renames the `Uno.UI.Toolkit` assembly to `Uno.UI.Extras` and keeps its types in their natural namespaces rather than moving them as a block, so the single `toolkit` xmlns splits three ways. `using:Uno.UI.Extras` is not a valid replacement, even though it compiles: that namespace exists but its only public type is the generated `GlobalStaticResources`, so the XAML generator emits type references to `Uno.UI.Extras.ElevatedView` and `Uno.UI.Extras.VisibleBoundsPadding`, which do not exist. Every affected template would fail at runtime instead of at build time. Map each usage to the namespace that actually owns the type, reusing the `uno` prefix this repo already binds to `Uno.UI.Xaml.Controls`: - `ElevatedView`, `CommandBarExtensions` -> `uno` - `VisibleBoundsPadding` -> `unobehaviors` - `UIElementExtensions` -> `unoxaml` Verified by disassembling the built assemblies: the emitted type references are now `Uno.UI.Xaml.Controls.ElevatedView` and `Uno.UI.Behaviors.VisibleBoundsPadding`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * fix: Match a template child with a type pattern (BC26) `GetTemplateChild<TControl>` constrained `TControl` to `class, DependencyObject` under `HAS_UNO`. Uno 7.0 makes `DependencyObject` a class, so that pair is now illegal (CS0450) — but simply dropping `class` breaks the other direction, because `child as TControl` then needs a class constraint of its own (CS0413) wherever `DependencyObject` is still an interface. A type pattern needs no class constraint at all, so it compiles either way and removes the dependency on how `DependencyObject` is declared. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * fix(samples): Build the Android host through UnoPlatformHostBuilder Uno 7.0 turns `NativeApplication.CreateHost()` into an abstract member and drops the `Func<Application>` constructor overload, so the Android heads no longer compile: error CS0534: 'Application' does not implement inherited abstract member 'NativeApplication.CreateHost()' Android has no managed entry point, so `CreateHost()` is where the host is built — the equivalent of `Main` on the other targets. Verified by compiling MaterialSampleApp for net10.0-android. A separate pre-existing manifest issue remains on that target: the SDK's default minSdkVersion 21 is below the 23 required by androidx.lifecycle.runtime. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * chore(deps): Bump Uno.ShowMeTheXAML to 3.0.0-dev0001 2.0.0-dev0015 binds Uno.UI.Toolkit, which Uno 7.0 renamed to Uno.UI.Extras and no longer ships, so the sample apps died at startup in the Hosting Smoke and Runtime Tests jobs: System.IO.FileNotFoundException: Could not load file or assembly 'Uno.UI.Toolkit, Version=255.255.255.255' at SkiaSharp.Views.Windows.GlobalStaticResources.Initialize() 3.0.0-dev0001 is the Uno 7.0 rebuild from unoplatform/ShowMeTheXAML#33, published to nuget.org. Both packages move together since they share a version line. servicing/8.0 stays on 2.0.0-dev0015: that line is Uno 6.x-compatible and 3.0.0 targets net10.0 only. * chore(deps): Bump Uno.Sdk.Private to 7.0.0-dev.697 `Uno.ShowMeTheXAML` 3.0.0-dev0001 depends on `Uno.WinUI` >= 7.0.0-dev.684, so pinning the SDK at 7.0.0-dev.679 fails every head at restore: error NU1605: Detected package downgrade: Uno.WinUI from 7.0.0-dev.684 to 7.0.0-dev.679 7.0.0-dev.697 also carries the XAML generator fix from unoplatform/uno#24457, which clears the CS0407 `_View` return-type errors that blocked `Uno.Simple.WinUI` on net10.0-android and net10.0-ios. Verified the fix is in this package: its nuspec pins commit ee8ffda8, and the PR's merge commit d5b9af48 is an ancestor of it. Both `global.json` files move together, since the nested one governs a sample head built directly, which is what CI does. Verified by publishing the Material desktop head with the CI command: 0 errors. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * fix(samples): Raise the Android minimum OS version to 24 The AndroidX libraries Uno 7 pins require API 23, so manifest merge fails on every Android head: error XAAMM0000: uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [...] androidx.lifecycle.runtime Uno raised its own SDK default to 24.0 in 4a29fb6a70, but this repo sets `SupportedOSPlatformVersion` explicitly in `PlatformItemGroups.props`, and the SDK default is guarded by `Condition="$(SupportedOSPlatformVersion) == ''"`. The repo value therefore always wins and no package bump can fix it here. Use 24.0 to match the new SDK default rather than the bare minimum of 23. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * refactor!: Drop markup gated on the removed xamarin and skia prefixes BREAKING CHANGE: the `MaterialMUXNavigationViewResetSplitViewStyle` resource key is removed. It was declared `xamarin:`-only and is unreferenced in this repository. Uno 7.0 reworked the conditional XAML prefix vocabulary. The surviving set is `android`, `ios`, `tvos`, `desktop`, `wasm`, `winappsdk`/`win` and their `not_` forms; `xamarin`, `skia`, `macos`, `netstdref`, `not_mux` and `legacy` are gone. Because every affected file also listed those prefixes in `mc:Ignorable`, the markup they gated is now silently discarded rather than reported — it compiles clean and applies on no platform at all. It was written for the native view rendering that 7.0 removed, so there is nothing left for it to do: - `<xamarin:Style>` / `<xamarin:VisualState>` / `<xamarin:Setter>` and the matching animation blocks in the Material and Cupertino control styles. - `xamarin:ContentTemplateSelector`, `xamarin:Glyph`, `skia:Opacity`. - `xamarin:Style="{StaticResource NativeDefaultFrame}"` in the samples shell — `NativeDefaultFrame` no longer exists in any Uno 7 assembly. `xamarin:UseNativeStyle` is dropped with the rest, even though `DatePicker.UseNativeStyle` and `TimePicker.UseNativeStyle` are still public: the attribute only ever meant anything for the native pickers. Deleting rather than remapping to `not_win:` keeps the change behavior preserving. `not_win` covers desktop and WebAssembly as well as mobile, so a remap would activate markup on platforms it never applied to. Verified: all three desktop sample heads publish with 0 errors, all 17 touched files parse as well formed XML, and the removed resource key has no remaining references. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * refactor: Sweep the conditional XAML prefixes for Uno 7 Uno 7 reworked the conditional prefix vocabulary, and this repo stacks a second vocabulary of its own on top (`mobile`, `uwp`/`winui`, `lottie_*`, defined in the four `*-common.props`). Resolution is keyed on the prefix NAME, not the URI, and a prefix in neither the include nor the exclude list is silently discarded when it appears in `mc:Ignorable` — so dead markup compiles clean and applies nowhere. Three behavior-preserving passes. 1. Remove 122 unused prefix declarations across 59 files, with the matching `mc:Ignorable` tokens, dropping `mc:Ignorable` and `xmlns:mc` together where nothing was left. Only declarations with no corresponding usage were touched. 2. Collapse `macos:` / `not_macos:`. `macos` is in neither vocabulary, so its 16 values were discarded; `not_macos` survives only because it happens to be declared as the presentation namespace rather than `http://uno.ui/not_macos`, which is why its values are the ones shipping. Delete the `macos` half, unwrap the `not_macos` half. The two must move together: at v1/PasswordBox.xaml, v1/TextBox.xaml and v2/TextBox.xaml, removing only `not_macos` would leave the control with no Padding at all. Also corrects doc/styles/TextBox.md, which documented `FilledTextBoxPadding` as the dead macOS value `16,7`; every platform actually gets `16,8`. 3. Collapse `uwp:` / `winui:`. Every library sets `FrameworkLineage=WinUI`, so the UWP arm is unreachable. `winui:UriSource` is what selects the Lottie assets, so it is unwrapped rather than deleted — removing both halves would strip `UriSource` from all four `LottieVisualSource` resources. The unreachable `<Choose>` blocks go with them, along with the `IsXamarinIOS`/`IsMonoAndroid`/ `IsXamarinMac` LinkerConfig groups, the MacCatalyst plumbing and the `net10.0-maccatalyst` expansion, none of which Uno 7 can reach. `ios:`, `android:`, `mobile:`, `win:`/`not_win:` and `lottie_not_win:` are all still live and are left alone. `todo:` and the `contract*` ApiInformation predicates are different mechanisms and are out of scope. Verified: all four desktop sample heads publish with 0 errors, every touched file parses as well formed XML, and no prefix that is still used lost its declaration. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * refactor!: Retire the native-era platform forks in the Material styles BREAKING CHANGE: the `MaterialTimePickerFlyoutPresenterStyle` and `MaterialCommandBarElevation` resource keys are removed. Consumers using `BasedOn` or `StaticResource` against either must drop the reference. Uno 7.0 renders iOS and Android through Skia, so the `ios:` and `android:` prefixes still apply but the native rendering they compensated for is gone. These forks all had a native premise and no longer have one. - CheckBox glyph nudge. The six `mobile:Margin="0,2,0,0"` offsets existed because the native renderer placed the glyph differently. All platforms now share the alignment commit acfb64b chose for the managed renderers. - CheckBox press ripple. `DoubleAnimationUsingKeyFrames` was worked around on iOS for issue #361 with a plain `DoubleAnimation` in CommonStates. Uno 7 deleted the Apple animator entirely (`f193975907`), so iOS and desktop now run the same `DispatcherDoubleAnimator` and the workaround is dead weight. Removing it also gives iOS a ripple on the unchecked-press transitions, which only ever had a `not_ios:` branch, and restores the Windows storyboards that `mc:Ignorable="ios not_ios"` was stripping. - TimePicker flyout. The iOS presenter framed a native picker that no longer exists, leaving a Cancel/Done bar over an empty body and a dangling `IosPickerFlyoutTextButtonStyle` reference. iOS now uses the default presenter, which works. - CommandBar. The iOS `Height="NaN"` and the Android-only 4dp elevation both encoded native chrome. Height matches the other platforms, and elevation is dropped to match v2, which never had it. - RadioButton press ripple. The keyframe animation was gated `wasm:` inside a library that builds no browserwasm target framework, so it shipped nowhere and desktop, WebAssembly and Windows had an empty storyboard. It is now unconditional, replacing the per-platform `android:` and `ios:` workarounds. - Samples. The Button padding pair collapses to the value that ships, and the Android-only hero `MinHeight` goes; the page already adapts by width. `ios:Margin` on the v2 PasswordBox reveal glyph is deliberately left in place: nothing ties it to native path bounds, so it needs a look on a device rather than an inference. Verified: all four desktop sample heads publish with 0 errors and every touched file parses as well formed XML. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC * fix(ci): Pin the SDK to the one uno.check provisions Provisioning wasm-tools downgrades the mono.toolchain.current manifest to uno.check's own (10.0.101), while the pipeline installed the 10.0.102 SDK. The workload resolver kept asking for Microsoft.NET.Runtime.MonoTargets.Sdk 10.0.2, which was never installed, so every net10.0-ios library build in the packages stage failed with NETSDK1147. Invisible while the libraries targeted net9.0, which resolves through the un-downgraded mono.toolchain.net9 manifest. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MbHmxnFUWzjgeBQgdZGC1T * chore: Target Uno.WinUI 7.0.0-dev.701 dev.701 moves Uno.UI.Adapter.Microsoft.Extensions.Logging onto Uno.Core 5.0.0-dev.28, so the central 4.0.1 pins have to follow or restore fails with NU1605. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RjVqiGVHKGZyRLuy9SVMZi * fix(samples): move samples to MSTest 4 with the runtime test engine (#1724) The canary bumps Uno.UI.RuntimeTests.Engine to 2.0.0-dev.85, which requires MSTest.TestFramework >= 4.3.3 while the samples pin 3.6.4. Restore fails with NU1605 (warnings as errors) before anything compiles, in all 14 jobs: Warning As Error: Detected package downgrade: MSTest.TestFramework from 4.3.3 to 3.6.4. MaterialSampleApp -> Uno.UI.RuntimeTests.Engine 2.0.0-dev.85 -> MSTest.TestFramework (>= 4.3.3) MaterialSampleApp -> MSTest.TestFramework (>= 3.6.4) The engine and MSTest versions are coupled and have to move together: engine 2.0.0-dev.60 uses ExpectedExceptionAttribute, which MSTest 4 removed, and that file ships as source inside the package, so it compiles into each sample app. Bumping MSTest alone breaks the build on master. MSTest 4 also introduces its own DescriptionAttribute, which is ambiguous with System.ComponentModel.DescriptionAttribute used for the enum display names (CS0104 in SourceSdk.cs and EnumHelper.cs). Verified locally: with the canary's SDK versions (Uno.Sdk 7.0.0-dev.2, Uno.Sdk.Private 7.0.0-dev.701) restore now succeeds on the Desktop and Android heads, and master still builds with its own SDK pins. Build: https://dev.azure.com/uno-platform/1dd81cbd-cb35-41de-a570-b0df3571a196/_build/results?buildId=233349&view=results Co-authored-by: Claude Opus 5 (1M context) <[email protected]> * ci: enforce dotnet format and XAML Styler (#1725) Co-authored-by: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: unodevops <[email protected]> Co-authored-by: Steve Bilogan <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: DerekRaven <[email protected]> Co-authored-by: agneszitte <[email protected]> Co-authored-by: Agnès ZITTE <[email protected]> Co-authored-by: Martin Zikmund <[email protected]>
Every generated `_Bindings` class carried a weak-vs-strong reference switch on
the owner:
#if UNO_HAS_UIELEMENT_IMPLICIT_PINNING
private global::System.WeakReference _ownerReference;
private MainPage Owner { get => (MainPage)_ownerReference?.Target; set => ... }
#else
private MainPage Owner { get; set; }
#endif
The weak reference existed to stop an opaque native reference pinning a
`UIElement`-as-`UIView`. In 7.0 `UIElement` derives from `DependencyObject` on
every target and is never a native view, so there is nothing left to unpin.
`UNO_HAS_UIELEMENT_IMPLICIT_PINNING` is also defined in exactly one place —
`src/Uno.CrossTargetting.targets`, under `$(IsIOS)` / `$(IsTvOS)` — and that file
is repo-internal: no `build/` or `buildTransitive/` targets in any shipped
package define it. So SamplesApp's iOS/tvOS heads compile the weak branch while
every downstream app on iOS compiles the strong one. CI has been exercising an
ownership model no consumer ships, which is the same class of blind spot as the
`_View` alias in #24457, only inverted.
Collapse to the strong branch — the one every consumer already gets — and drop
the now-unread constant along with its entry in the constants list. Nothing else
in the repo references it.
38 expected-output files lose the 5-line block; no other generated text changes.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSKHVLNtHS6yTB5V3ww3d7
Every generated `_Bindings` class carried a weak-vs-strong reference switch on
the owner:
#if UNO_HAS_UIELEMENT_IMPLICIT_PINNING
private global::System.WeakReference _ownerReference;
private MainPage Owner { get => (MainPage)_ownerReference?.Target; set => ... }
#else
private MainPage Owner { get; set; }
#endif
The weak reference existed to stop an opaque native reference pinning a
`UIElement`-as-`UIView`. In 7.0 `UIElement` derives from `DependencyObject` on
every target and is never a native view, so there is nothing left to unpin.
`UNO_HAS_UIELEMENT_IMPLICIT_PINNING` is also defined in exactly one place —
`src/Uno.CrossTargetting.targets`, under `$(IsIOS)` / `$(IsTvOS)` — and that file
is repo-internal: no `build/` or `buildTransitive/` targets in any shipped
package define it. So SamplesApp's iOS/tvOS heads compile the weak branch while
every downstream app on iOS compiles the strong one. CI has been exercising an
ownership model no consumer ships, which is the same class of blind spot as the
`_View` alias in #24457, only inverted.
Collapse to the strong branch — the one every consumer already gets — and drop
the now-unread constant along with its entry in the constants list. Nothing else
in the repo references it.
38 expected-output files lose the 5-line block; no other generated text changes.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSKHVLNtHS6yTB5V3ww3d7
GitHub Issue: closes #24459
What
The XAML generator emits a platform-conditional alias for
_Viewthat predates the removal of native view rendering in 7.0:_Viewis the return type chosen atXamlFileGenerator.cs:6489for every generatedFrameworkTemplatebuilder (used at:6536and:1037), and those builders are converted toUno.UI.FrameworkTemplateBuilderat:6552viaMarkupHelper.CreateControlTemplate. That delegate returnsUIElement(src/Uno.UI/Uno/FrameworkTemplateBuilder.cs:15). In 7.0UIElementderives fromDependencyObjectand is unrelated toAndroid.Views.View/UIKit.UIView, so taking either native branch makes the method-group conversion illegal:Why it is never seen in CI, but breaks consumers
HAS_UNO_SKIAis defined byUno.WinUI.Runtime.Skia.Android/.AppleUIKit, which ship it frombuild/rather thanbuildTransitive/— so it applies to a direct package reference only. The Uno SDK adds that reference itself withPrivateAssets="all". Every project in this repo, and everyUno.Sdkproject anywhere, therefore lands in the first branch.A plain
<Project Sdk="Microsoft.NET.Sdk">library that referencesUno.WinUIdoes not get the constant, andUno.WinUI's nuspec has no android/ios dependency group through which it could arrive. On iOS the fall-through is automatic —__IOS__is defined by .NET for iOS itself. Such a library cannot compile any XAML template on a mobile target framework.The snapshot tests compare generated text and embed the
#if/#elifverbatim, so they pass regardless of platform — the defect is invisible to them.Found while porting unoplatform/Uno.Themes#1722 to 7.0:
Uno.Simple.WinUIis the one library there not on the Uno SDK, and it alone fails onnet10.0-androidandnet10.0-ios.The change
Collapse the block to the single alias that is correct on every target. Both native branches are dead code — Uno.WinUI 7.0 ships no android or ios assembly (
lib/holds onlynet10.0,net10.0-windows10.0.19041.0,net11.0,net11.0-windows10.0.19041.0), so they can only ever produce output that fails to compile.src/Uno.UI/UI/Xaml/Media/VisualTreeHelper.cs:26already aliases unconditionally; only the generator was left behind.The two branches actually taken today already emit exactly this line, so no configuration that builds today changes a single generated character. The 111 snapshot updates are that 9-line block collapsing to 1 line, and nothing else.
Verification
HAS_UNO_SKIAon the affected downstream library (Uno.Simple.WinUI,net10.0-android) takes it from 4 × CS0407 to 0 errors. That is the branch this PR makes unconditional.HAS_UNO_SKIA/UIKit.UIView/Android.Views.Viewanywhere underXamlCodeGeneratorTests/Out.Verified locally: the generator test suite now runs green on this branch — 493 tests, 0 failed, 479 passed, 14 skipped, using the CI-pinned .NET 11 preview SDK (
11.0.100-preview.7.26381.103, perbuild/ci/net11/_global.json). Baseline check: the identical suite onmasterproduces the same result, so this branch introduces no new failures.Follow-up, out of scope
HasImplicitViewPinning(XamlFileGenerator.cs:7432-7433) is still true on everynet*-ios/maccatalyst/macoscompilation and emits now-pointlessprivate Func<_View> _elementStubHolder_N;fields. Harmless after this fix —Func<UIElement>converts to the ctor'sFunc<object>— but the same stale native-view assumption.🤖 Generated with Claude Code
https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC