Repository navigation
fix: Resolve duplicate materializedProvider local in ResourceDictionary (backport #23500) - #23576
mergify[bot] wants to merge 1 commit into
Conversation
(cherry picked from commit bbea80b) # Conflicts: # src/Uno.UI/UI/Xaml/ResourceDictionary.cs
|
Cherry-pick of bbea80b has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
Heads up on this Mergify backport. @MartinZikmund you marked the initial PR as "planned" to be backported for the 6.6 release, but I think it may not be applicable to 6.6 and wanted your call before resolving. Why the cherry-pick failsThe conflict on
else if (newValue is IDependencyObjectStoreProvider storeProvider)
{
storeProvider.Store.IsResourceDictionaryItem = true;
}Comparison with master
Root cause
Options
What would you like to do? |
Seeing this comment now. I believe option 1 is the best choice |
GitHub Issue: closes #23499
PR Type:
🐞 Bugfix
What changed? 🚀
Fixes a CS0136 build break in
ResourceDictionary.csthat fails CI (and localmasterbuilds) for the Skia and Referencenet10.0targets:This is a merge-time collision, not a defect in either change on its own. Two independently-merged PRs each introduced a pattern variable named
materializedProvider:fix(theming): resolve binding & resource ThemeResource against owner theme(84a8eadd1f) —if (value is IDependencyObjectStoreProvider materializedProvider ...)in the enclosing block scope, after thetry/finally.fix(alc): resources must not inherit DataContext from their host subtree(58a07c27d2) —else if (newValue is IDependencyObjectStoreProvider materializedProvider)inside the nestedfinallyblock.A pattern variable in the enclosing block has scope spanning the rest of that block, so the inner-scope (
finally) declaration collides with it even though it appears textually earlier. Each branch compiled cleanly in isolation; the conflict only surfaced once both landed onmaster.This PR renames the
finally-block occurrence tostoreProvider. The two are independent casts toIDependencyObjectStoreProviderof different values (newValuevsvalue), so the rename is a pure scoping fix with no behavioral change.PR Checklist ✅
Screenshots Compare Test Runresults.This is an automatic backport of pull request #23500 done by [Mergify](https://mergify.com).