ReviewOS

also looking at this

craft-native/craft

fix(ci): stop evaluating `pantry env`, which sometimes re-installs JS deps mid-job

#107
Merged glennmichael123 wants to merge fix/ci-drop-pantry-env into main
6 files +16 -17
11 days ago

integration failed on #106 at "Build TypeScript SDK" with Cannot find package 'typescript', while typescript-sdk — same commit, same runner, same command, same shim — passed. The difference is one step earlier: integration runs eval "$(pantry env …)" && zig build, and in that run the log shows pantry running a workspace setup inside the eval — installing its own typescript@7.1.0-dev (not what the lockfile names), then its own bun install with an explicit --linker (js_delegate.zig:208) that overrides bunfig.toml's hoisted. The explicit install step had produced 351 packages; this produced 683, and root node_modules/typescript was gone.

It is intermittent, and that is the argument for this PR

main is currently green, including integration, without this change. Same workflow, same cache key, same pantry version — the setup simply did not fire:

pantry cacheInstalling JS depsresult
#106 run 33776563410hityes — 683 packages, typescript@7.1.0-devintegration fail
main run 33779108264hitnointegration pass

pantry skips the install when it decides deps are already in sync (js_delegate.zig:33), so whether node_modules gets rewritten mid-job depends on runner state rather than on anything in this repo. That is worse than a deterministic break: it fails a job that nothing in the diff touched, and it passes on retry.

So this is not a fix for a red main — main is green. It removes the nondeterminism.

The eval was never load-bearing

pantry env exports only PANTRY_* variables (0.10.3 exports none), and no workflow reads them. zig is on PATH because the pantry action already puts every installed bin there (packages/action/src/index.ts:852–912) — which is why bun install runs with no eval at all, and why zig-js's CI uses the same action with bare zig build.

Removed from all 16 sites across five workflows. The Apple signing gate in release.yml is untouched.

Verification

All 9 checks green on this PR, including zig-core on both platforms (proving zig resolves without the eval) and integration (proving the shim survives).

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

Sign in to comment on this pull request.