Skip to content

0.7.4: install re-resolves the whole dependency graph instead of only what changed #709

Description

@candrewlee14

What happens

After a small manifest edit, nub install on 0.7.4 re-resolves every ranged dependency to the newest version in range, instead of keeping the versions already in the lockfile. 0.6.0 only updates what the edit touched.

Same repo, same three-line change to a pnpm-workspace.yaml catalog (three specs, each to an equivalent range so nothing needed to move):

changed lines in pnpm-lock.yaml
0.7.4 14,492 (2,456 version changes)
0.6.0 6 (just the three spec strings)

It also happens with no manifest edit at all. nub install --no-frozen-lockfile on an unchanged manifest moved unrelated packages, for example @types/pg 8.20.0 to 8.20.4.

Where it seems to come from

Probably the vendored engine rather than nub itself. Standalone aube 1.38.0 does the same thing on the same repo; nub 0.6.0 does not. 0.7.0 synced the engine to upstream 1.35.0.

Why it hurt

A one-line dependency change became a 14k-line lockfile diff. The version movement was enough to break type checking in our workspace, so a routine change turned into a debugging session. It also broke a release: the same behaviour reached a lockfile merge driver we have configured as nub install --lockfile-only, and a rebase produced a lockfile pinning an older version of a package than the manifest asked for, while reporting success.

For now we make the manifest edit, generate the lockfile with 0.6.0, and verify with nub ci on 0.7.4, which accepts the result.

Note

--frozen-lockfile and the default --prefer-frozen-lockfile disagree about the same lockfile: frozen treats it as current, while the default decides it is stale and re-resolves everything. That looked like the most useful thread to pull on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions