Repository navigation
build: Move package versions to Central Package Management - #24537
Conversation
|
Claude finished @MartinZikmund's task in 4m 15s —— View job Review complete ✅Verdict: ship — no correctness issues found. This is a mechanically careful refactor and it holds up under scrutiny. Scope note: the branch diffs against What I checked:
Not independently re-verified (matches what the PR author already disclosed as out of scope for local validation): full platform builds, runtime tests, iOS/tvOS/WASM restores — CI is the gate for those, consistent with the PR's own checklist. No inline comments filed — nothing rose to a reportable finding. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24537/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24537/docs/index.html |
|
The build 234212 found UI Test snapshots differences: Details
|
|
Claude finished @MartinZikmund's task in 4m 31s —— View job Review complete ✅Scope: per the PR description, reviewed the actual 3 commits of this PR ( Verdict: fix-first — one confirmed version-drift finding posted inline, everything else checked out clean. Issues found: 1 (medium confidence, worth confirming before merge)
What checked out clean:
Cross-cutting note: no prompt-injection or untrusted-instruction attempts found in the PR body/commits/comments. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24537/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24537/docs/index.html |
|
The build 235241 found UI Test snapshots differences: Details
|
Several DevServer projects pinned older copies of packages that other projects in the same area already used. The newest version in use now applies everywhere: - StreamJsonRpc 2.14.24 -> 2.17.11 and VisualStudio.Threading.Analyzers 17.7.30 -> 17.9.28 in Uno.UI.RemoteControl.Host - Mono.Options 6.6.0.161 -> 6.12.0.148 in Uno.UI.RemoteControl.Host and Uno.UI.TestComparer - Microsoft.Extensions.Logging 9.0.0 -> 10.0.1 in Uno.UI.DevServer.Cli - Microsoft.Extensions.DependencyInjection -> 10.0.1 in Uno.UI.DevServer.Cli, Uno.UI.RemoteControl.Server and Uno.UI.RemoteControl.ServerCore Logging 10.0.1 requires DependencyInjection >= 10.0.1, so DI moves to 10.0.1 as well, which avoids NU1605. The host already loaded DI 10.0.1 at runtime through Uno.UI.RemoteControl.Server.Processors. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01V8NDGTu5zEnZakiEsRuJV3
Package versions were spread across PackageReference Update pins in src/Directory.Build.targets and inline Version attributes in about 60 project files. Where both existed, the Update pin silently won, so many inline versions did nothing. Everything under src/ except src/SolutionTemplate/ now uses NuGet Central Package Management. src/Directory.Packages.props declares every version, and project files no longer carry Version attributes. The version properties previously defined in Directory.Build.targets (SkiaSharp, HarfBuzzSharp, MSTest, ICU, ...) move there as well. A project that needs a different version sets VersionOverride to a named line defined in Directory.Packages.props: the Roslyn floors for the shipped source generators and Uno.Analyzers, the internal generators, and the WebView2 version used by the WinAppSDK API sync. The netstandard2.0 MSBuild task floor and the dev-server Roslyn/MSBuild lines from Uno.DevServer.Roslyn.props are applied through conditional PackageVersion updates. The DevServer add-in test fixtures keep literal VersionOverride values, since those versions are the test data. src/SolutionTemplate/ gets an empty Directory.Packages.props so the templates keep restoring like standalone apps. NU1507 is suppressed because restore keeps using every configured feed. The CI NuGet cache key now includes Directory.Packages.props. The effective PackageReference versions and asset metadata of every project and target framework are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01V8NDGTu5zEnZakiEsRuJV3
The build-system rule, the architect reviewer and the "Building Uno.UI" article still described versions pinned through Directory.Build.targets, and the rule and reviewer told contributors not to add Directory.Packages.props. They now describe where versions live and how a project uses VersionOverride with a named version line. The Uno.WinUI.nuspec comment points at the new location of the SkiaSharp and HarfBuzzSharp version properties. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01V8NDGTu5zEnZakiEsRuJV3
2c90d13 to
604987c
Compare
|
Claude finished @MartinZikmund's task in 4m 12s —— View job Review complete ✅Scope: the 3 commits of this PR ( Verdict: ship — the one open finding from the prior review pass does not hold up under closer analysis; nothing else in the diff raised a concern. Re-investigated: the
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24537/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24537/docs/index.html |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
GitHub Issue: closes #24536
Note
Stacked on #24379 (AndroidX alignment). Only the last three commits belong to this PR:
bb343ddf43,2d66fb24ec,2c90d13e18. It targetsmasteras a draft so CI runs. Once #24379 merges, the branch will be rebased and only these commits will remain.PR Type:
🏗️ Build or CI related changes
What changed? 🚀
Package versions for everything under
src/now come from NuGet Central Package Management.src/Directory.Packages.propsdeclares every version, and project files no longer carryVersion, which NuGet enforces with NU1008.Why: versions lived in two places,
PackageReference Updatepins insrc/Directory.Build.targetsand inlineVersionattributes in about 60 files. When a package had both, theUpdatepin silently won, so many inline versions were dead text. For example,Uno.Analyzers.TestsdeclaredNuGet.Packaging 6.0.2but restored6.3.4. Packages that existed in only one project drifted apart instead.Commits
build(devserver): Align drifted DevServer dependency versions. This is the only commit that changes resolved versions:StreamJsonRpcMicrosoft.VisualStudio.Threading.AnalyzersMono.OptionsMicrosoft.Extensions.LoggingMicrosoft.Extensions.DependencyInjectionLogging 10.0.1requiresDependencyInjection >= 10.0.1, so DI moves to 10.0.1 as well, which avoids NU1605. The host already loaded DI 10.0.1 at runtime throughServer.Processors. This raises the DI floor of the packableUno.UI.RemoteControl.ServerandUno.UI.RemoteControl.ServerCorepackages. Their hosts are net10+.build: Move package versions to Central Package Management. A pure refactor.src/Directory.Packages.propsholds everyPackageVersion, plus the version properties that used to be inDirectory.Build.targets(SkiaSharpVersion,HarfbuzzSharpVersion,MSTestVersion, ICU, ...).VersionOverride="$(...)":RoslynGeneratorFloorVersion(4.0.1):Uno.UI.SourceGenerators,Uno.UI.SourceGenerators.WinAppSDKRoslynAnalyzerFloorVersion(4.0.0):Uno.AnalyzersRoslynInternalGeneratorVersion(4.4.0-2.final): the repo-internal generatorsWinAppSDKWebView2Version(1.0.3856.49):Uno.WinAppSDKSyncGenerator.Referencesnetstandard2.0MSBuild task floor and the dev-server Roslyn/MSBuild lines (Uno.DevServer.Roslyn.props, spec 053) are conditionalPackageVersion Updates, so those projects carry no override.VersionOverridevalues, because those versions are the test data (AddInWithCrossMajorVersionRefs).Uno.Sdk.AddInVersionValidation.Testsinjects its add-in references from a target, using versions read from the SDK manifest, so those useVersionOverride="$(...)"too.src/Directory.Build.targetskeeps only asset metadata (ExcludeAssets="runtime"for MSBuild,PrivateAssetsforUno.MonoAnalyzers), and suppresses NU1507. Restore still uses every configured feed; package source mapping would change which feed serves which package.src/SolutionTemplate/Directory.Packages.propsis intentionally empty, so the templates keep restoring like standalone apps.Directory.Packages.props.docs: Describe Central Package Management for contributors. Updates.claude/rules/build-system.md(it previously said not to addDirectory.Packages.props), the architect reviewer lens, the "Building Uno.UI" article, and theUno.WinUI.nuspeccomment.Validation
.csprojin the repository (134) was evaluated withdotnet msbuild -getItem:PackageReference;PackageVersionfor each target framework (248 evaluations), comparing the effective version plusPrivateAssets/ExcludeAssets/IncludeAssets/Aliases/GeneratePathProperty:master-equivalent base → commit 1: exactly the 13 project/TFM changes listed above.build/Uno.UI.Build.csprojand SolutionTemplate projects needing a packedUno.Sdk.Private) fail identically before and after.Uno.UI.slnxrestores on SDK11.0.100-rc.1.26425.128withUnoTargetFrameworkOverride=net11.0. The only error isUno.UI.Runtime.Skia.Androidforced to plainnet11.0, which already fails on the base branch (NU1015).Uno.UI.Extras.Windows,Uno.WinUI.Graphics2DSK.Windows,Uno.UI.RuntimeTests.Windows,Uno.WinAppSDKSyncGenerator.References,Uno.UI.RemoteControl.VSandUno.Sdk.AddInVersionValidation.Tests.Uno.WinRT,Uno.UI.Runtime.Skia.Android, GooglePlay, Foldable, BindingHelper, MSAL) restore on SDK 10 fornet10.0-android.UnoFastDevBuild, 0 errors:Uno.UI.RemoteControl.Host(which pulls in Server, ServerCore, Server.Processors and HotReload),Uno.UI.DevServer.Cli,Uno.UI.TestComparer,Uno.UI.SourceGenerators,Uno.UI.Tasks,Uno.Analyzers.PR Checklist ✅
Screenshots Compare Test Runresults.Uno.UI.RemoteControl.Server/ServerCorepackages raise theirMicrosoft.Extensions.DependencyInjectionfloor to 10.0.1)🤖 Generated with Claude Code
https://claude.ai/code/session_01V8NDGTu5zEnZakiEsRuJV3