On a project that has both npm workspaces and a companion deps.yaml, pantry install --frozen-lockfile fails against a lockfile pantry install produced moments earlier:
Error: lockfile is out of date (--frozen-lockfile)The generated lock is missing the npm entries the committed one has:
only in committed: is-odd@3.0.1
only in committed: is-number@7.0.0Reproduction
ws/
package.json { "workspaces": ["packages/*"], "dependencies": { "is-odd": "3.0.1" } }
packages/a/package.json { "dependencies": { "is-number": "7.0.0" } }
deps.yaml dependencies: { ccache.dev: ^4 }pantry install # writes pantry.lock
pantry install --frozen-lockfile # rejects the lock it just wroteWhich versions
| 0.11.55 (released) | accepts |
main (unmodified) | rejects |
Checked by stashing an unrelated in-progress change, rebuilding from clean main, and re-running — the rejection is present without it. So this arrived between the 0.11.55 tag and now.
Where to look
core.zig compares the committed lock against a staged generated one when a workspace has a companion deps file (staged_lockfile_path). The workspace installer stages its lock, and the companion step merges system packages into that staged file. In frozen mode the staged lock ends up without the npm entries — so the comparison sees the committed lock as ahead and calls it out of date, when nothing has actually changed.
The likely cause is the workspace installer taking a lockfile-first fast path in frozen mode and not populating the generated lock with npm entries it did not have to resolve.
Why it matters
--frozen-lockfile is the CI mode. A project of this shape — npm workspaces plus system dependencies, which is what the companion file exists for — cannot currently gate CI on its lockfile at all against main.
Found while fixing #231; unrelated to that change, and deliberately left alone there.