Repository navigation
build: Consolidate SamplesApp into a single Uno.Sdk head (Skia + WinUI) - #23536
Conversation
|
Claude finished @MartinZikmund's task in 8m 18s —— View job PR Review — Consolidate SamplesApp into Uno.Sdk head
Overall verdictThis is a well-structured consolidation. The approach (Uno.Sdk.Private pinned via global.json, hybrid source-mode ProjectReferences, per-TFM Platforms/ entry points) is sound, and the build-infra notes in the spec/plan are unusually thorough. Four targeted issues found; one of them (missing Findings by severity
Cross-cutting notes
|
|
|
|
Claude finished @MartinZikmund's task in 3m 4s —— View job PR Review — Consolidate SamplesApp into Uno.Sdk head
Overall verdictWell-structured consolidation with a sound approach. Six targeted findings; the two medium-severity ones have real CI impact. Findings by severity
Cross-cutting notes
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23536/wasm-skia-net9/index.html |
|
Claude finished @MartinZikmund's task in 5m 0s —— View job PR Review — Consolidate SamplesApp into Uno.Sdk head
Overall verdictThe latest 5 commits correctly address real CI blockers (locked .dotnet DLLs preventing the dotnet-install cache restore, missing wasm asset manifest, signing-identity failure from auto-wired entitlements, and publish-item validation running on Android/iOS where it can never pass). Those fixes are well-scoped and technically sound. Six findings from the two prior review rounds remain unaddressed. Two of them have real CI impact. Findings by severity
New-commit notes (no new findings)The pack script ( Validation: Code review (diff inspection) only — build-infra changes; CI pipelines are the authoritative gate. |
Nothing consumes the sentinel package now. Deletes the pack script and its CI template, drops the pin from the three global.json files, and removes the pack step from the seven pipelines that ran it. All three global.json files return to their pre-branch contents. src/SolutionTemplate/** is unaffected: those projects pin their own published Uno.Sdk.Private versions from real feeds. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015xdwWkWw7bVkiotSp3Gdtc
Replaces the per-platform startup-project instructions with the single head plus the target-framework dropdown, and records the SDK-import revision in specs/051. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015xdwWkWw7bVkiotSp3Gdtc
The head is the SamplesApp now that it covers every platform, so the
".Head" qualifier only added noise. Moves the project to
src/SamplesApp/SamplesApp/SamplesApp.csproj and updates the solution,
both filters, _AdjustedOutputProjects, the seven CI pipelines and the
iOS UI-test script — including the bin/SamplesApp.Head output paths,
which move with the project name.
Program.cs drops to `namespace SamplesApp`, which makes its explicit
SamplesApp.App qualification redundant.
AssemblyName stays explicit even though it now matches the project name:
nine InternalsVisibleTo("SamplesApp") grants across the framework key off
that exact string.
SamplesApp.Skia keeps its name — it is slated for removal outright.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015xdwWkWw7bVkiotSp3Gdtc
Rebase carry-over. feature/breakingchanges renamed the UI-layer projects (f5d6efd) and folded the MSAL Reference flavor into Skia (e48de10) after this branch forked, so the head's ProjectReferences pointed at paths that no longer exist. Mirrors the same retarget base applied to SamplesApp.Skia.csproj. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0162Wt7JNLnEiowb8UZUSkAt
0d90e18 to
1d79805
Compare
|
Claude finished @MartinZikmund's task in 2m 30s —— View job PR Review — Consolidate SamplesApp into Uno.Sdk head
Overall verdictThe single new commit ( New-commit notes (no new findings)
Resolved findings (full history)
Cross-cutting noteThe CI run (build Validation: Code review (diff inspection) and local file reads. All 8 updated |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23536/wasm-skia-net9/index.html |
The entry only inserted a `SamplesApp` segment into bin/ and obj/. Its stated reason -- keeping the six target frameworks from colliding -- does not hold: Microsoft.NET.DefaultOutputPaths.targets already appends $(TargetFramework) to both paths. The list exists for folders holding several project variants (Uno.UI.Skia.csproj + Uno.UI.Reference.csproj); this head is alone in its folder. The DefaultItemExcludes half is covered by the .NET SDK, which excludes $(BaseOutputPath)/** and $(BaseIntermediateOutputPath)/** on its own. Reverts the six CI artifact paths to bin/Release/<TFM>/ accordingly. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
… property
The head carried 55 calls to GetTargetPlatformIdentifier('$(TargetFramework)')
across 50 lines, each ~100 characters, which is most of what makes the file look
dense. Compute the platform identifier once into $(_Platform) and gate on that.
The declaration must sit below the windows TargetFramework collapse, and cannot
be replaced by Uno.Sdk's $(IsAndroid)/$(IsWinAppSdk): those default to false
during the Sdk.props import at the top of the file, and are only corrected by
Uno.Common.*.targets at the bottom -- after every PropertyGroup condition here
has been evaluated. Hoisting the declaration above the collapse makes the
WinAppSDK publish resolve AssemblyName to SamplesApp instead of SamplesApp.Windows
and _IsSkiaTfm to true, pulling 14 ProjectReferences instead of 6.
The one remaining call reads $(UnoTargetFrameworkOverride) and is left alone.
Also drops _IsMobile, which had no uses.
Verified inert: MSBuild evaluation of ProjectReference, PackageReference,
Content, AndroidAsset, BundleResource, EmbeddedResource, UnoIcon,
UnoSplashScreen, TrimmerRootAssembly plus UnoRuntimeIdentifier, AssemblyName,
DefineConstants, NoWarn and ApplicationManifest is byte-identical before and
after on all six target frameworks, including ios/tvos and the windows collapse
path. Confirmed the comparison is sensitive by hoisting the declaration and
watching the windows evaluation change.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-23536/docs/index.html |
- NU1703 was suppressed twice; the unconditional one at the top already covers the android restore, so the android NoWarn no longer repeats it. - The wasm and android trimming suppressions shared 13 codes; those move to _UnoTrimmingNoWarn, leaving each platform to list only what is its own. - Microsoft.Extensions.Logging.Console/.Debug carried an inline 5.0.0 that Directory.Build.targets already pins to the same version via PackageReference Update, so the local value never applied. - Merges adjacent groups sharing a condition: the two android PackageReference groups, the android ApplicationId PropertyGroup, and the three desktop item groups. Item order within each merged group is preserved. Verified inert: MSBuild evaluation of the same item and property set is unchanged on all six target frameworks, with NoWarn compared as a set (the codes are reordered, not altered). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
The old WebAssembly head gated Issue109289_Workaround on
NETCoreSdkVersion.StartsWith('9.0.'), so it never ran on the .NET 10/11 SDKs
this repo builds with. Consolidating the heads dropped that gate, silently
turning a dead target into a live one that rewrites the emcc link arguments on
every wasm build.
Restoring the gate would just reinstate dead code, so the target goes instead.
Verified with a net10.0-browserwasm build that runs the native link step
(WasmBuildNative=true): wasm-ld succeeds, and libSkiaSharp.a is already ordered
last in the link line, which is what the workaround existed to force.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
Nine comment blocks in the head were multi-paragraph explanations of MSBuild and SDK behaviour. Each keeps a one- or two-line statement of why the line is there; the long form moves to a new appendix in specs/051-samplesapp-unosdk-skia/plan.md, which the file header points at. This is a move, not a delete: the spec had no coverage of NETSDK1129, MonoAndroidAssetsPrefix, Uno0005, IL2008 or the iOS reserved Resources folder before this. Two corrections while there. The UnoRuntimeIdentifier comment claimed Uno.Sdk sets it too late for cross-targeting; in fact Uno.Common.Desktop.targets sets it for desktop in good time, and the real reason the head sets it is browserwasm, where nothing in Uno.Sdk does. And the two ordering constraints that had no comment now have one: the Runtime.Skia.Android fragment must precede the source-generator import, and the shared-content imports must stay below Sdk.props. Verified inert: with restore state held fixed, MSBuild evaluation is identical before and after on all six target frameworks. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
|
Claude finished @MartinZikmund's task in 3m 40s —— View job PR Review — Consolidate SamplesApp into Uno.Sdk head
Overall verdictThe five new commits ( Response to inline thread questions
The result is a csproj that is ~150 lines shorter, with comments explaining why rather than narrating MSBuild mechanics. New-commit notes (no new findings)
All prior-round findings — resolved
Remaining cross-cutting concernThe CI run (build Validation: Code review (diff inspection) and local file reads. |
|
Follow-up cleanup deferred from this PR is tracked in #24045 (Uno.Sdk defaults the head restates, the tvOS single-project gap, the stale |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23536/wasm-skia-net9/index.html |
NativeApplication became abstract on feature/breakingchanges, replacing the app-factory constructor argument with a CreateHost() contract. The old netcoremobile head was migrated with it; this head was created in parallel and the rebase carried the new base class without updating it, so net10.0-android has not compiled since: Main.Android.cs(27,15): error CS0534: 'Application' does not implement inherited abstract member 'NativeApplication.CreateHost()' Adopts the same shape as SamplesApp.Skia.netcoremobile: the base constructor takes only the JNI handle, and the app factory moves into CreateHost() via UnoPlatformHostBuilder. That also defers host creation to first activity start, which is what the new base class expects, so ContextHelper.Current is populated by then. Compile-validated: net10.0-android builds clean, and the generated AndroidManifest.xml registers the Application ACW as before. Not runtime- validated -- no emulator available here; the android runtime-test stage covers it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
|
Claude finished @MartinZikmund's task in 2m 10s —— View job PR Review — Consolidate SamplesApp into Uno.Sdk head
Overall verdictThe single new commit ( New-commit notes (no new findings)
Resolved findings (full history)
Remaining cross-cutting concernThe CI run (build Validation: Code review (diff inspection) and local file reads. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23536/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-23536/docs/index.html |
GitHub Issue: closes unoplatform/uno-private#2151 (internal: "Convert Samples app to Uno.Sdk", Platform 7.0)
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
Consolidates the four separate SamplesApp heads (
SamplesApp.Skia.Generic,SamplesApp.Skia.WebAssembly.Browser,SamplesApp.Skia.netcoremobile,SamplesApp.Windows) into oneUno.Sdk-based multi-targeted head,src/SamplesApp/SamplesApp.Head, that targets every Skia target plus WinUI/WinAppSDK:Approach
Sdk="Uno.Sdk.Private", consumed from the in-reposrc/Uno.Sdk(packed at a fixed sentinel version intosrc/PackageCache, pinned in rootglobal.json). Abuild/pack-local-uno-sdk.ps1produces it.DisableImplicitUnoPackages=true+ per-TFMProjectReferences to in-repo Uno source — the repo's from-source model. ASamplesAppUseImplicitPackagesswitch (defaultfalse) flips to the customer-facing<UnoFeatures>→NuGet path on demand.SamplesApp.Skialibrary (samples compile once as Skia); WinUI inlines the shared content and uses the real WinUI XAML compiler (itsMicrosoft.UI.Xamlhas a different type identity thanUno.UI.Skia).Platforms/{Desktop,WebAssembly,Windows,Android,iOS,tvOS}/.Build status (from this branch)
dotnet builddotnet buildMSBuild.exedotnet buildCI
All platform build/test stages and scripts (desktop, wasm, android + coreclr/nativeaot, ios, winappsdk) are repointed to the new head — platform TFMs,
bin/SamplesApp.Head/...output paths,SamplesApp.dllfor desktop runtime tests, MSBuild.exe kept for WinUI. Pending validation on the real pipelines.Notable findings (documented in
specs/051-samplesapp-unosdk-skia/)SamplesApp.Windows(avoids anInternalsVisibleTo× assembly-name collision withUno.UI.Toolkit/Uno.Foundation) and Uno's source generators are gated off WinUI.__ANDROID__, pulling native-only types absent fromUno.UI.Skia).Not in this PR (deliberate)
SamplesApp.WasmshareSamplesApp.Windowsresources, and the RuntimeTests ALC/HotReload apps reference the Generic head'sbin. Deletion is best coordinated with the native-head removal (and relocatingPackage.appxmanifest).splash_screendrawable); WinUIdotnet run/winappdev-loop.PR Checklist ✅
specs/051-samplesapp-unosdk-skia/Screenshots Compare Test Runresults (pending CI)