Repository navigation
build: NuGet lock files and locked restores, so the Windows App SDK cannot float silently (#1085) - #1087
Merged
Conversation
deblasis
added a commit
that referenced
this pull request
Sep 10, 2026
… the helper locks (#1087 review) Three Lows from the review round, all fixed: - CI drift gate step: a failed restore used to fall through to the diff check, which then finds no drift and exits 0, a vacuous green. pwsh does not stop on native-command failure, so the step now exits with the restore's own code right after each restore line. - release_gate_check.ps1 restored and tested Release UNLOCKED, so the release-gate leg compiled against the live feed. Its dotnet build and dotnet test now pass RestoreLockedMode like the rest of the ladder; the msbuild -getProperty probe only evaluates properties and never restores, so it needs nothing. - The three non-solution helper projects (RasterizeIcons, BackdropStage, WindowCapture) had committed locks that nothing regenerated or locked. The test-win gate force-evaluates them alongside the solution, gives them a locked restore (NU1004 on a stale helper lock), and the remediation text now names the actual regeneration path.
This was referenced Sep 11, 2026
Closed
The WindowsAppSDK 2.2.0 metapackage floors eight of its nine component dependencies at open ranges (WinUI >= 2.2.1; no WinUI 2.2.0 exists on nuget.org, the 2.2.0 train shipped WinUI as 2.2.1), so a fresh restore resolves whatever the feed serves that day, and the same commit can compile against different bits: Microsoft.DotNet.ILCompiler moved 10.0.11 -> 10.0.12 between two consecutive days' restores. Every project that restores under windows/ and dist/windows/ now writes a committed packages.lock.json. build-win, build-win-release, test-win and the windows-tests workflow restore in locked mode, so the build compiles against exactly what the locks resolve. test-win and CI also run an unlocked restore first and refuse if it would change any committed lock, so both drift shapes fail the ladder: a fresh-machine float, and a PackageReference edit without a regenerated lock.
… the helper locks (#1087 review) Three Lows from the review round, all fixed: - CI drift gate step: a failed restore used to fall through to the diff check, which then finds no drift and exits 0, a vacuous green. pwsh does not stop on native-command failure, so the step now exits with the restore's own code right after each restore line. - release_gate_check.ps1 restored and tested Release UNLOCKED, so the release-gate leg compiled against the live feed. Its dotnet build and dotnet test now pass RestoreLockedMode like the rest of the ladder; the msbuild -getProperty probe only evaluates properties and never restores, so it needs nothing. - The three non-solution helper projects (RasterizeIcons, BackdropStage, WindowCapture) had committed locks that nothing regenerated or locked. The test-win gate force-evaluates them alongside the solution, gives them a locked restore (NU1004 on a stale helper lock), and the remediation text now names the actual regeneration path.
deblasis
force-pushed
the
claude/nuget-lock-files
branch
from
September 11, 2026 06:29
65ac0ed to
0e5c377
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #1084 (branched from its branch; it carries the one-line
NotificationHost.xaml fix a fresh restore needs under WinUI 2.2.1). Rebase
onto
windowsfollows once that lands.Why WinUI resolves to 2.2.1 under the 2.2.0 pin
The
Microsoft.WindowsAppSDK2.2.0 metapackage's own nuspec depends onMicrosoft.WindowsAppSDK.WinUIwith the open range>= 2.2.1. There is noWinUI 2.2.0 on nuget.org at all: the version index jumps from 2.1.0 straight
to 2.2.1, and registration shows both published 2026-06-09 as part of the
2.2.0 train. NuGet's lowest-applicable rule lands on 2.2.1 and will move to
whatever the next stable WinUI >= 2.2.1 is (2.2.2-experimental is already on
the feed), because the range is open. Eight of the metapackage's nine
component dependencies are floored the same way (AI >= 2.2.3, ML >= 2.1.70,
Base, Foundation, DWrite, Widgets, InteractiveExperiences); only Runtime is
exact-pinned
[2.2.0]. The float is not theoretical: between twoconsecutive days' restores of the same tree,
Microsoft.DotNet.ILCompiler(and ILLink.Tasks, win-x64 runtime) moved 10.0.11 to 10.0.12.
The choice: lock what resolves today (WinUI 2.2.1)
Pinning WinUI back to 2.2.0 is not an option that exists: that version was
never published. WinUI 2.2.1 has been the resolution since the 2.2.0 pin
landed (it is what every restore this machine made produced), and #1084's
XAML fix already accommodates its compiler. So the locks freeze exactly
today's resolution, with content hashes, and any future move becomes a
deliberate lock update that review sees.
What this changes
RestorePackagesWithLockFileinwindows/Directory.Build.propsand a newdist/windows/Directory.Build.props(the IconGen/SplashGen quartetrestores as part of
Ghostty.sln); 13 committedpackages.lock.jsonfiles, one beside every csproj that restores, including the three
non-solution helper projects (RasterizeIcons, BackdropStage,
WindowCapture). Locked mode is passed per invocation rather than set in
props, because the release tiers patch package references onto this
tree and must keep restoring until their per-tier lock files exist (pin
bump PR).
build-win,build-win-release,test-winand thewindows-testsworkflow restore with
RestoreLockedMode=true: a PackageReference changewithout a regenerated lock fails the restore with NU1004 naming the delta.
test-winand in CI: an unlockeddotnet restore --force-evaluateregenerates every lock the way a freshmachine would, and the leg refuses to continue if the result differs from
HEAD by content. Two hardening details are baked in, both found while
verifying:
--force-evaluateis required because an incremental restoreon a warm tree is a no-op and never re-resolves; and the comparison is a
git diffcontent check rather thangit status, because NuGet rewriteslock files with CRLF while the repo stores them LF and status flags that
EOL-only rewrite as modified on every fresh checkout. Untracked lock
files fail the gate separately. Verified RED on a committed lock that
says WinUI 2.2.0 (the restore rewrites it to 2.2.1, the gate stops the
leg with the content hunk printed) and on a csproj edit without a
regenerated lock (NU1004 naming the delta), then GREEN on the clean tree.
Fixes #1085