Skip to content

pnpr: support --lockfile-only on the pnpr install path (resolve-only mode) #12146

Description

@zkochan

Problem

pacquet install --lockfile-only (and the lockfileOnly setting) is not honored when a pnprServer is configured. --lockfile-only in pnpm means resolve + write pnpm-lock.yaml, fetch nothing, link nothing, but the pnpr fast path can't express that today:

  • POST /v1/install resolves and computes the file-level diff in one round-trip, streaming back the digests the client is missing (D lines) + store-index entries (I lines).
  • PnprClient::install downloads those missing files from /v1/files into the CAFS as part of the same call, before the client decides what to materialize.

So there is no "resolve-only" mode: by the time the client could skip linking, the files have already been fetched into the store — which diverges from pnpm's lockfile-only (it fetches nothing). Honoring the flag faithfully needs either:

  1. a server-side resolve-only mode on /v1/install (return just the lockfile, skip the file diff), or
  2. a client flag telling PnprClient::install to skip the /v1/files download, and install_via_pnpr to skip the materialization Install.

Current behavior (as of #12144)

To avoid the most-wrong outcome (silently fetching and linking despite --lockfile-only), pacquet install --lockfile-only combined with pnprServer now errors rather than silently ignoring the flag. This issue tracks lifting that restriction with proper resolve-only support.

Relevant code

  • pacquet/crates/cli/src/cli_args/install.rs (install_via_pnpr)
  • pacquet/crates/pnpr-client/src/lib.rs (PnprClient::install/v1/install + /v1/files)
  • pnpr/crates/pnpr/src/install_accelerator.rs (handle_install), install_accelerator/resolve.rs

Related: #12139.


Written by an agent (Claude Code, claude-opus-4-8).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions