Repository navigation
fix(sdk-updater): hold first-party groups to the manifest's Uno major - #2297
choksi2212 wants to merge 1 commit into
Conversation
The updater's compatibility gate cannot tell that a first-party package moved to the next Uno major: NuGet dependency versions are floors, so a 7.0 package keeps validating against a 6.8 Uno.WinUI for a while, and several first-party packages (Uno.Fonts.*, Uno.Resizetizer, Uno.Settings.DevServer, Uno.UI.App.Mcp) declare no Uno dependency at all, so nothing is checked for them. On a prerelease Uno.Sdk line the minor+1 bound is skipped too, leaving no upper bound at all. On a 6.8 Uno.Sdk line the updater today moves Resizetizer to 2.0, settings to 2.0 and AppMcp to 2.0 - all Uno 7.0-era packages that uno-updater.yml would auto-merge unattended. Hold first-party groups (packages all prefixed Uno.) to the major already pinned in packages.json, reusing the existing majorUpgradeDisabledGroups mechanism, so they keep taking servicing updates and a major move becomes a deliberate manifest change. On stable lines this is a no-op: the minor+1 bound already caps majors. Also make the nuspec gate honest while it runs: a package is only compatible if every dependency group is, instead of letting the first group decide for the whole package, and a transitive dependency that was already checked and found incompatible now fails the group instead of being skipped. Closes unoplatform#2291
|
|
|
Gentle nudge on this one too - a week without review activity. The gate is behavior-preserving for first-party packages within the manifest's major (verified against live feeds on a 6.8 seed: no major-jumps on Resizetizer/settings/AppMcp/UnoFonts, 7.0-window byte-identical). Note the CLA check shows unsigned - if that's just awaiting a signature I'll get it sorted. |
|
Tick the box to add this pull request to the merge queue (same as
|
Closes #2291
Problem
The compatibility gate cannot tell that a first-party package has moved to the next Uno major:
IsCompatibleWithUnoWinUIreads theUno.WinUIdependency from the candidate's nuspec, but NuGet dependency versions are floors - a package that moves to 7.0 keeps its old floor for a while (e.g.Uno.WinUI.Markup 7.0.0-dev.5still declaresUno.WinUI 6.7.0-dev.41, so it validates clean against a 6.8 SDK).Uno.Fonts.*,Uno.Resizetizer,Uno.Settings.DevServerandUno.UI.App.Mcphave nuspecs with no Uno dependency at all (Uno.UI.App.Mcp 2.0.0-dev.5depends only onSkiaSharp), so the trailing unconditionalAddResult(..., true)marks them valid.HasBeenCheckedafter the firstAddResult), and in the transitive branch a dependency that was already recorded invalid is skipped instead of failing the group.GetVersionAsynconly applies theminor+1bound when the Uno.Sdk line is stable, so on a prerelease line there is no upper bound at all.Repro (run today, against unmodified
main@ 4929d52, local manifest seeded to the 6.8 SDK's own versions, feeds live)NBGV_SemVer2=6.8.0-dev.9999 dotnet run -c Release --project tools/Uno.Sdk.Updater -- --exclude-file .github/sdk-update-exclude.jsonresolves Core
6.8.0-dev.193and then reports:All Uno 7.0-era packages paired with a 6.8
Uno.WinUI, whichuno-updater.ymlwould auto-merge unattended.Fix
Selection-time major ceiling for first-party groups (
Program.cs): a group whose packages are allUno.*-prefixed is held to the major already pinned inpackages.json, reusing the existingmajorUpgradeDisabledGroupsmechanism. First-party groups keep taking servicing updates within their pinned major; moving one to the next Uno major becomes a deliberate manifest change (which is exactly what the manual freeze in #2240 works around today). On stable lines this is a no-op - theminor+1bound already caps majors there.Honest nuspec gate (
NuGetClient.cs): a package is only compatible if every dependency group is (previously the first group's verdict won), and a transitive dependency that was already checked and found incompatible now fails the group instead of being skipped.Verification
All against the live nuget.org + Uno private feeds, unmodified
main@ 4929d52 vs this branch, same 6.8-era seed (Uno.Sdk.Private 6.8.0-dev.193manifest):Regression check on the main line (7.0 window, real
packages.json): the update sets produced bymainand by this PR are identical -hotdesign 1.24.0-dev.38,Extensions 8.0.0-dev.59,AppMcp 2.0.0-dev.5,WinAppSdkBuildToolsWinApp 0.7.1- so within-major updates of first-party groups (including preview-to-preview bumps) are unaffected.Both runs complete with exit 0 and finish the full update (packages.json/ReadMe/props/targets written).