Repository navigation
refactor: Move the Uno.UWP project to Uno.WinRT - #24009
Conversation
|
Claude finished @MartinZikmund's task in 6m 14s —— View job PR Review:
|
| Site | Verdict |
|---|---|
InternalsVisibleTo("Uno") × 3 assemblies |
✅ All updated to "Uno.WinRT" |
RuntimeAssetsSelectorTask.IsWinRTAssembly — string literal "uno" |
✅ Updated to "uno.winrt", .ToLower() normalisation preserved |
TestAssemblyLoadContext — name.Equals("Uno", ...) removal |
✅ Correct; StartsWith("Uno.", ...) already covers Uno.WinRT |
LinkerDefinition.Wasm.xml — <assembly fullname="Uno"> |
✅ Updated to "Uno.WinRT" |
UnoAssemblyHelper — bin subdirectory & file name |
✅ Uno.WinRT / Uno.WinRT.dll |
CSGenerator.ApplyCompilationOptions — old Uno.dll shadowing fix |
✅ Correctly filters the superseded package reference before adding local build |
WinAppSDKSyncGenerator — 19 path/comment strings |
✅ All updated |
Nuspec — 26 <file src> entries |
✅ All updated |
_AdjustedOutputProjects — 4 renamed, 1 phantom dropped |
✅ Correct |
SamplesApp.Skia.Generic.csproj — hard-coded Uno.dll copy entries |
✅ Updated |
Findings
Medium — PackageDiff historical IgnoreSets modified (contradicts PR description)
→ See inline comment on build/PackageDiffIgnore.xml:228
The PR says "historical sets are untouched" but the diff replaces Uno.UWP.Resource → Uno.WinRT.Resource in the 4.4.20 and 4.5 IgnoreSets. Those released versions shipped Uno.UWP.Resource; changing the entry shifts suppression from "old type removed" to "new type added". The 6.6 set's new <Assemblies><Member fullName="Uno"> broad ignore may cover the gap — but only if the tool applies IgnoreSets cumulatively when comparing against older baselines. A quick PackageDiff run against the 4.4.20 baseline (or confirmation that the tool is cumulative) would resolve this.
Low — CSGenerator.ApplyCompilationOptions rebuilds references on every call
→ See inline comment on CSGenerator.cs:227 — efficiency nit, not a correctness issue.
Low — ShouldEmitNativeDefines backslash path check (pre-existing)
→ See inline comment on Generator.cs. Pre-existing, non-blocking, but worth a note while it's in view.
Cross-cutting notes
- No
event Action/event Action<T>violations. - No async discipline issues (rename PR, no async code touched).
- The duplicate-assembly-identity hazard in the test harness is correctly diagnosed and fixed at root (filtering the superseded
Uno.dllreference before addingUno.WinRT.dllfrom the local build). - Conventional Commits title (
refactor!) is correct for a breaking rename with no type/namespace changes.
|
@XiaotianNetlift when reviewing it is better to go by individual commits, as one of them is basically moving all the files, which makes the PR huge |
|
|
|
The build 226455 found UI Test snapshots differences: Details
|
|
|
|
@copilot doc/articles/migrating-to-uno-7.md:71 MD028/no-blanks-blockquote Blank line inside blockquote |
Head branch was pushed to by a user without write access
|
|
Adds both renames to the 7.0 migration guide, including the duplicate Windows.* type hazard when mixing majors, and records them in the breaking-changes rollup (BC53 name decided, BC77 added). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: MartinZikmund <[email protected]>
getAssemblyExports() still asked for "Uno", so the browser head threw an unhandled rejection during CoreApplication init and never reached first frame. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RYaKJ1ff37ukTu1ETjCjVe
Uno.UI.HotDesign is implicitly referenced by every Debug app build, and the Material/Extensions/Toolkit/CSharpMarkup/MVUX features resolve to packages that are all still compiled against the `Uno` assembly, so the generated bindable metadata fails with CS0012. Restore both once 7.0 builds are published. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RYaKJ1ff37ukTu1ETjCjVe
Aligns the folder with the csproj stem and assembly name, as every other library in the tree does, and drops the historical "UWP" name. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RYaKJ1ff37ukTu1ETjCjVe
Renaming the assembly is a binary break for every library compiled against Uno 6.x — including Uno.UI.HotDesign, which the SDK references implicitly in every Debug build. The folder and project move stands on its own; the assembly identity does not need to follow. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RYaKJ1ff37ukTu1ETjCjVe
Project references, solution files and filters, adjusted output projects, nuspec source paths and the sync generator's project routing. The Uno.WinRT package id is unchanged, so package references keep their name. Matches the sync generator's platform discriminator on the Generated segment: a repository cloned into a folder named "Uno" would otherwise look like the WinRT project to every base path. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RYaKJ1ff37ukTu1ETjCjVe
Part A no longer changes the assembly, so it produces no user-facing change: drops the migration-guide row and the rollup item (which had also collided with the existing BC77), and records in the spec why the identity split was abandoned. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RYaKJ1ff37ukTu1ETjCjVe
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GP2BeVCQzY3sQB7QBv173u
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GP2BeVCQzY3sQB7QBv173u
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GP2BeVCQzY3sQB7QBv173u
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GP2BeVCQzY3sQB7QBv173u
The title read Uno.Foundation, which is a different package that this one depends on. Every other nuspec titles itself after its own id. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011nVqNSZBu7E3FpHxWyPdtk
The project is src/Uno and the assembly is Uno. Historical IgnoreSets keep their Uno.UWP.Resource entries: they record what those baselines shipped. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011nVqNSZBu7E3FpHxWyPdtk
The rename is deferred behind the first-party upgrade waves, not dropped. Records the measured blast radius and flags that Part B hits the same unresolvable-reference problem. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011nVqNSZBu7E3FpHxWyPdtk
Folder, csprojs and NuGet package now agree on Uno.WinRT. The assembly stays Uno.dll: renaming the identity is sequenced behind the first-party 7.0 upgrade waves, so bin/Uno.WinRT.<variant>/ still emits Uno.dll. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011nVqNSZBu7E3FpHxWyPdtk
Renaming the csprojs moves bin/<ProjectName>/ too, so build outputs relocate while Uno.dll keeps its name. Records that split, the legacy SamplesApp head, and why the folder name helps the sync generator. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011nVqNSZBu7E3FpHxWyPdtk
809b422 to
0a5f28f
Compare
|
Claude finished @MartinZikmund's task in 2m 2s —— View job PR Review:
|
| BC | Line | Stale | Correct |
|---|---|---|---|
| BC55 | 124 | src/Uno/Storage/ApplicationDataContainer.Android.cs |
src/Uno.WinRT/Storage/… |
| BC74 | 231 | src/Uno/Helpers/AndroidResourceNameEncoder.cs, DrawableHelper.Android.cs |
src/Uno.WinRT/Helpers/… |
| BC75 | 250 | "WinRT library at src/Uno" |
"WinRT library at src/Uno.WinRT" |
| BC76 | 273 | src/Uno/Generated/3.0.0.0/Windows.UI.Input* |
src/Uno.WinRT/Generated/… |
All src/Uno.WinRT/ paths verified to exist on disk.
Cross-cutting notes
- No
event Action/event Action<T>violations. - No async/cancellation discipline issues.
- All other prior findings remain resolved.
- CI screenshot deltas originate in the
feature/breakingchangesbase branch — this PR is a pure project-folder rename with no behavioral change. - Conventional Commits title (
refactor!) is correct.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24009/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24009/docs/index.html |
|
The build 229239 found UI Test snapshots differences: Details
|
GitHub Issue: part of unoplatform/uno-private#2137 (the assembly half lands separately — see below)
PR Type:
🔄 Refactoring (no functional changes, no api changes)
What changed? 🚀
Moves the WinRT project to
Uno.WinRT— folder and csprojs only. The assembly is deliberately left alone.src/Uno.UWP→src/Uno.WinRTUno.{Skia,Reference,Wasm,netcoremobile}.csproj→Uno.WinRT.{…}.csproj<AssemblyName>Uno</AssemblyName>— unchanged, still producesUno.dllRootNamespacestaysWindows— no type or namespace movesUno.WinRT"UWP" predates Uno Platform's WinAppSDK alignment, and this folder was the only library in the tree whose name disagreed with its csprojs (
Uno.UWP/Uno.Skia.csproj, against theUno.Foundation/Uno.Foundation.Skia.csprojpattern). TheUno.WinRTname is not new: it is what the shipping NuGet package and the public docs have always called this layer ("Uno.WinRT is the non-UI layer of Uno Platform" —doc/articles/features/using-winrt.md). Only the folder and the assembly disagreed.Nothing ships differently. The package, the assembly and every type keep their identity, so PackageDiff sees no delta and consumers need no action. Only the inputs to packing move.
Why the assembly rename is not in this PR
Uno.dll→Uno.WinRT.dllis a different assembly identity, so every binary compiled against Uno 6.x stops resolving — not only those touching a changed API. The Uno.Sdk referencesUno.UI.HotDesignimplicitly in every Debug app build, which transitively pullsUno.Toolkit.WinUIandUno.Themes.WinUI; all of them referenceUno, so template builds fail withCS0012until those ship 7.0 builds.That is an ordering problem, not a compatibility one — 7.0 breaks compatibility by design. The rename is therefore sequenced inside the 7.0 preview line rather than deferred to a later major: it is implemented and parked on
dev/mazi/winrt-assembly, to merge onceUno.UI.HotDesignhas a 7.0 build. Landing the folder here means that follow-up is a one-lineAssemblyNamechange rather than a second folder move.Full rationale, including the measured blast radius, is in
specs/056-assembly-renames/spec.md.Beyond the obvious find-and-replace
Renaming the csprojs also moves
bin/<ProjectName>/, so build outputs relocate even thoughUno.dlldoes not. Splitting that distinction wrong is the easiest mistake here:<file src>paths inUno.WinRT.nuspec:src\Uno.UWP\Bin\Uno.<variant>\…→src\Uno.WinRT\Bin\Uno.WinRT.<variant>\…, with the trailingUno.dll/Uno.pdbunchanged (they followAssemblyName, not the csproj name)_AdjustedOutputProjectsentries key on the csproj file name, so unlike a pure folder move they do have to be rewritten. Two named aUno.Tests.csprojthat does not exist — dropped rather than renamedUnoAssemblyHelper.cstakes folder, assembly file name andbin/subfolders as three separate arguments; the first and third move, the second does notGenerated/output paths andbasePath.Contains(@"\Uno.UWP\")discriminatorSamplesApp/SamplesApp.csproj— 4ProjectReferences. No solution filter builds this legacy head, so nothing fails when it is left staleAGENTS.mdand the WinUI-porting skill document the source layout by pathDrive-by fixes in the same area
Uno.WinRT.nuspechad<title>Uno.Foundation</title>— a different package, and the one it depends on. Every other nuspec titles itself after its own id, and this one is user-visible on nuget.org.reason=strings in the active 6.6PackageDiffIgnoreset namedUno.UWP, a project that no longer exists. Historical IgnoreSets are untouched — they record what those baselines shipped.AndroidResgenNamespacestaysUno.UWPdeliberately: the generatedUno.UWP.Resourcetype is public in the mobile head and matches the 6.6 PackageDiff baseline, so renaming it alone would register a removed public type and need a fresh ignore entry, to buy nothing. It moves with the assembly in the follow-up.PR Checklist ✅
specs/056-assembly-renames/spec.md;AGENTS.mdand the WinUI-porting skill updated for the new path.Screenshots Compare Test Runresults.Validation
Uno.WinRT.Skiabin/Uno.WinRT.Skia/…/**Uno.dll**, confirming the csproj rename movedbin/whileAssemblyNameheldUno.UISamplesApp.Skia.Generic.slnf/.slnxproject pathsProjectReferencein the treeSystem.Xamlleftovers aside)Local builds use
-p:UnoTargetFrameworkOverride=net10.0becausefeature/breakingchangestargets .NET 11 and no .NET 11 SDK is installed here.Not validated locally, left to CI: a full solution build, and specifically
Uno.WinAppSDKSyncGeneratorandUno.UI.SourceGenerators.Tests, which are net11-only and cannot be built here at all — both carry path edits from this PR. Also left to CI: the sync-generator regeneration round-trip, packaging/PackageDiff, and runtime tests.🤖 Generated with Claude Code
https://claude.ai/code/session_011nVqNSZBu7E3FpHxWyPdtk