ReviewOS

also looking at this

pantry-pm/pantry

fix: preserve sources when removing linked workspace directories

#247
Merged chris wants to merge codex/preserve-linked-workspace-sources into main
4 files +98 -46
8 days ago

Windows workspace reconciliation followed pantry/<member> directory symlinks and deleted their tracked source trees. Craft's release lost packages/zig/build.zig during an ordinary repeated workspace install.

Use the standard I/O tree deletion implementation so links themselves are removed, including Windows directory reparse points and nested links. Native tests cover root and nested directory links; the real Windows installer repeatedly relinks both symlinks and junctions while checking exact source bytes and destinations.

The Windows compiler relocation journey uses one native Windows move. Bun 1.4.3's rename failed on the installed compiler tree while Win32 MoveFileEx succeeded. The journey still requires the old prefix to be absent, the alias to remain a symlink, the compiler SHA-256 to match, and stdlib compilation and execution to succeed from both locations. Existing command/job deadlines remain unchanged.

Validated on f049c4a / actual CI checkout b269c2b: all 15 CI and all-platform checks succeeded (notification skipped). Bun: 1,717 passed, 18 skipped, zero failures. Zig: 42/42 build steps, 1,604 passed, 7 skipped. Native Windows source preservation and installed/relocated compiler acceptance both passed. Types and Pickier pass with zero lint errors.

Before-fix source-loss reproduction: https://github.com/craft-native/craft/actions/runs/39404797310/job/118568011347. Qualified CI: https://github.com/pantry-pm/pantry/actions/runs/39412849160 and https://github.com/pantry-pm/pantry/actions/runs/39412848886.

4 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.