Skip to content

fix(pacquet): honor enableGlobalVirtualStore in the fresh-resolve install path#11819

Merged
zkochan merged 1 commit into
mainfrom
fix/11814
May 21, 2026
Merged

fix(pacquet): honor enableGlobalVirtualStore in the fresh-resolve install path#11819
zkochan merged 1 commit into
mainfrom
fix/11814

Conversation

@zkochan

@zkochan zkochan commented May 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Closes pacquet: honor enableGlobalVirtualStore in the fresh-resolve install path #11814. pacquet install (no flag, fresh project) hardcoded VirtualStoreLayout::legacy, so it silently materialized packages into the project-local node_modules/.pnpm/ even when enableGlobalVirtualStore: true was set. Now it routes through <store_dir>/v11/links/<scope>/<name>/<version>/<hash>/... like the frozen-lockfile path does.
  • Adds a thin build_lockfile_view_from_resolver_graph adapter (resolver's DependenciesGraphsnapshots: / packages: maps) so all hashing, slot-dir, and bin-linker code is shared with the frozen-lockfile path through VirtualStoreLayout::new(...). Stops short of writing pnpm-lock.yaml (the full writable-lockfile adapter is pacquet: port the writable-lockfile install path (resolver → Lockfile adapter) #11813's scope).
  • Calls pacquet_store_dir::register_project on the workspace root after the fresh-resolve install when GVS is on, mirroring the frozen-lockfile branch so the prune sweep can find this consumer of <store_dir>/links/....
  • Side effect: aligns the without-lockfile path's per-package save directory with the peer-suffixed slot the children-recursion was already using, so peer-suffixed snapshots no longer split between two unreachable slot directories.

Test plan

  • New integration test fresh_install_honors_enable_global_virtual_store (pacquet/crates/cli/tests/install.rs) asserts both the GVS slot path under <store_dir>/v11/links/ and the project-registry entry under <store_dir>/v11/projects/ after pacquet install with no lockfile.
  • Four unit tests for the new adapter (peer-suffixed depPath parsing, npm-alias children, duplicate peer contexts collapsing to one package entry).
  • cargo nextest run -p pacquet-package-manager — 283 tests pass.
  • cargo nextest run -p pacquet-cli — 94 tests pass, including the existing GVS parity tests (same_global_virtual_store_layout_pure_js, same_global_virtual_store_layout_diamond).
  • just lint clean, just fmt clean.

Notes

  • pacquet_testing_utils::bin::CommandTempCwd::add_mocked_registry now pins enableGlobalVirtualStore: false in the generated pnpm-workspace.yaml so tests are hermetic regardless of any GVS opt-in the developer has set in their global pnpm config (~/.config/pnpm/config.yaml on XDG-style hosts, ~/Library/Preferences/pnpm/config.yaml on macOS by default). The existing enable_gvs_in_workspace_yaml helper now flips that line in-place rather than appending — pnpm rejects duplicate top-level mapping keys.
  • One unit-test snapshot in install/tests.rs was updated: @pnpm/xyz@1.0.0 has peer deps on @pnpm/x/@pnpm/y/@pnpm/z, so its slot now correctly lands at the peer-suffixed name (matching the frozen-lockfile path and pnpm). The previous snapshot encoded the pre-existing inconsistency where install_subtree and install_package_from_registry disagreed on whether to include peers in the slot name.

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

Summary by CodeRabbit

  • New Features

    • Enhanced global virtual store support with proper project registration during fresh installs.
  • Tests

    • Added regression test verifying correct dependency placement when global virtual store is enabled.
  • Bug Fixes

    • Improved package installation path handling for global virtual store configurations.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR implements Global Virtual Store (GVS) support for pacquet's fresh-install flow. It precomputes a per-install VirtualStoreLayout with AllowBuildPolicy handling, threads it through the install context, computes per-package slot directories for pnpm-compatible path layouts, registers projects in the global store, and adds an integration test verifying GVS directory structures.

Changes

Global Virtual Store Fresh-Install Implementation

Layer / File(s) Summary
Test Infrastructure and Hermetic Workspace Defaults
pacquet/crates/cli/tests/_utils.rs, pacquet/crates/cli/tests/pnpm_compatibility.rs, pacquet/crates/testing-utils/src/bin.rs
Adds shared enable_gvs_in_workspace_yaml utility for toggling GVS in tests, removes duplicate helper from pnpm_compatibility, and updates mocked registry generation to pin enableGlobalVirtualStore: false for test hermeticity with an explicit override path for GVS-focused tests.
Per-Package Slot Directory Refactoring
pacquet/crates/package-manager/src/install_package_from_registry.rs, pacquet/crates/package-manager/src/install_package_from_registry/tests.rs
Refactors InstallPackageFromRegistry to accept per-package slot_dir computed by VirtualStoreLayout, changes save_path calculation from legacy virtual_store_dir-based to slot_dir/node_modules/<real-name>, and updates all test cases to construct and pass slot_dir.
Fresh-Install GVS Core Implementation
pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
Adds AllowBuildsPolicy error variant, precomputes per-install VirtualStoreLayout with optional lockfile snapshot and node engine probing for GVS, extends InstallCtx with layout reference, computes per-dependency slot_dir via layout with legacy fallback, derives recursive child_node_modules from slot_dir, and reuses precomputed lockfile for output when available.
Install Flow GVS Project Registration
pacquet/crates/package-manager/src/install.rs, pacquet/crates/package-manager/src/install/tests.rs, pacquet/crates/package-manager/src/virtual_store_layout.rs
Adds best-effort fresh-lockfile project registration with pacquet_store_dir::register_project when GVS enabled (warns on failure), updates frozen-lockfile comment clarification, and clarifies VirtualStoreLayout::legacy doc to emphasize it stays project-local regardless of GVS config.
GVS Integration Test Verification
pacquet/crates/cli/tests/install.rs
Unix-only test enabling GVS via shared utility, running fresh install without lockfile, verifying dependency symlinks appear under global store v11/links tree (not project-local legacy layout) and project registration under v11/projects/ with directory existence check.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

Poem

🐰 A warren of paths, once tangled and flat,
Now slots through the store in a pnpm format—
Each package finds home where the layouts declare,
Fresh installs with virtue in global-store air,
Projects register proud in v11's bright tree! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main fix: honoring enableGlobalVirtualStore in the fresh-resolve install path, which is the primary objective of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/11814

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
tarball/download_dependency    1.06      8.0±0.24ms   544.2 KB/sec    1.00      7.5±0.22ms   574.8 KB/sec

@codecov-commenter

codecov-commenter commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.42857% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.58%. Comparing base (8695496) to head (93f22d8).

Files with missing lines Patch % Lines
pacquet/crates/package-manager/src/install.rs 60.00% 2 Missing ⚠️
...package-manager/src/install_with_fresh_lockfile.rs 96.42% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11819   +/-   ##
=======================================
  Coverage   87.57%   87.58%           
=======================================
  Files         203      203           
  Lines       24024    24045   +21     
=======================================
+ Hits        21040    21060   +20     
- Misses       2984     2985    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Scenario: Frozen Lockfile

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.399 ± 0.059 2.296 2.461 1.03 ± 0.03
pacquet@main 2.331 ± 0.043 2.254 2.399 1.00
pnpm 4.561 ± 0.042 4.507 4.626 1.96 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.39882321686,
      "stddev": 0.05861264828035116,
      "median": 2.4007814935600003,
      "user": 2.75615978,
      "system": 3.62787568,
      "min": 2.29565586456,
      "max": 2.46081691456,
      "times": [
        2.40104104156,
        2.39980911456,
        2.3092606995600002,
        2.46081691456,
        2.44653682656,
        2.37333356756,
        2.45798468556,
        2.44327150856,
        2.29565586456,
        2.4005219455600004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.3314319386600006,
      "stddev": 0.043223210168798376,
      "median": 2.33093983856,
      "user": 2.77211728,
      "system": 3.59702748,
      "min": 2.2537845195600004,
      "max": 2.39879511556,
      "times": [
        2.2966287755600003,
        2.30868295356,
        2.33037184556,
        2.39879511556,
        2.2537845195600004,
        2.3066033815600004,
        2.33150783156,
        2.3397356155600004,
        2.3838528725600003,
        2.36435647556
      ]
    },
    {
      "command": "pnpm",
      "mean": 4.561310107760001,
      "stddev": 0.04211830698377037,
      "median": 4.563425258560001,
      "user": 7.73609398,
      "system": 4.02595538,
      "min": 4.5068498445600005,
      "max": 4.6255847795600005,
      "times": [
        4.6209129655600005,
        4.56636189856,
        4.56048861856,
        4.5068498445600005,
        4.51499433556,
        4.50848688656,
        4.57317023556,
        4.56035710056,
        4.57589441256,
        4.6255847795600005
      ]
    }
  ]
}

Scenario: Frozen Lockfile (Hot Cache)

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 693.1 ± 22.4 672.1 753.7 1.00
pacquet@main 700.0 ± 33.3 675.2 775.5 1.01 ± 0.06
pnpm 2401.7 ± 111.8 2317.4 2690.4 3.47 ± 0.20
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6931113623,
      "stddev": 0.022351986600453372,
      "median": 0.6894020049,
      "user": 0.3855689,
      "system": 1.59301588,
      "min": 0.6721115689,
      "max": 0.7537375759,
      "times": [
        0.7537375759,
        0.6721115689,
        0.6894659099,
        0.6903377309000001,
        0.6933794649,
        0.6815809849,
        0.6951641569,
        0.6842238589,
        0.6817742719000001,
        0.6893380999000001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6999855719,
      "stddev": 0.03332183121989024,
      "median": 0.6833980588999999,
      "user": 0.36504059999999994,
      "system": 1.5889379799999999,
      "min": 0.6751565749,
      "max": 0.7755073639,
      "times": [
        0.7106824849,
        0.6827178179,
        0.7755073639,
        0.6866072479,
        0.6751565749,
        0.6825495549,
        0.7418564749000001,
        0.6806302379,
        0.6800696619000001,
        0.6840782999
      ]
    },
    {
      "command": "pnpm",
      "mean": 2.401711359,
      "stddev": 0.1118042383292205,
      "median": 2.3677398599000004,
      "user": 2.9555865999999997,
      "system": 2.20510068,
      "min": 2.3173904059000003,
      "max": 2.6904074889,
      "times": [
        2.3691768369000004,
        2.3173904059000003,
        2.3252566839,
        2.6904074889,
        2.4033740379000004,
        2.3328835699000003,
        2.3663028829000003,
        2.4342389939,
        2.3267135679,
        2.4513691219
      ]
    }
  ]
}

…stall path

`pacquet install` (no flag, fresh project) was hardcoded to
`VirtualStoreLayout::legacy`, so it materialized packages under the
project-local `node_modules/.pnpm/` even when `enableGlobalVirtualStore:
true` was configured. Closes #11814.

A new `build_lockfile_view_from_resolver_graph` adapter converts the
resolver's `DependenciesGraph` into the `snapshots:` / `packages:`
shape `VirtualStoreLayout::new` already consumes, so all hashing,
slot-dir, and bin-linker code is shared with the frozen-lockfile path.
The without-lockfile flow now also calls `register_project` against
the shared store when GVS is on, mirroring the frozen-lockfile branch.

Side effect: aligns the without-lockfile path's per-package save
directory with the peer-suffixed slot the children-recursion was
already using, so peer-suffixed snapshots no longer split between two
unreachable slot directories.
@zkochan zkochan marked this pull request as ready for review May 21, 2026 14:59
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
pacquet/crates/cli/tests/install.rs (1)

495-503: ⚡ Quick win

Use precise assertion for project-registry entry count.

The frozen-lockfile test asserts exactly one project entry (assert_eq!(entries.len(), 1)), but this test uses >= 1. For a single-project install, exactly one registry entry should exist.

📏 Suggested refinement for precision
-    let project_count = projects_entries.count();
-    assert!(
-        project_count >= 1,
-        "expected at least one project-registry entry under {projects_dir:?}; got {project_count}",
-    );
+    let project_entries: Vec<_> = projects_entries.collect::<Result<_, _>>().expect("read project entries");
+    assert_eq!(
+        project_entries.len(),
+        1,
+        "expected exactly one project-registry entry for a single-project install under {projects_dir:?}",
+    );

This matches the precision of the frozen-lockfile test at line 1868 in install/tests.rs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pacquet/crates/cli/tests/install.rs` around lines 495 - 503, The test
currently allows >=1 project-registry entries but should assert exactly one for
a single-project install; change the assertion that uses project_count (computed
from projects_entries.count()) to assert_eq!(project_count, 1) and update the
failure message to reflect the expected exact count, keeping references to
canonical_store and projects_dir to locate the check.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pacquet/crates/cli/tests/install.rs`:
- Around line 495-503: The test currently allows >=1 project-registry entries
but should assert exactly one for a single-project install; change the assertion
that uses project_count (computed from projects_entries.count()) to
assert_eq!(project_count, 1) and update the failure message to reflect the
expected exact count, keeping references to canonical_store and projects_dir to
locate the check.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 33fa66fb-57a2-48cb-9302-f5ff27d6407b

📥 Commits

Reviewing files that changed from the base of the PR and between 8695496 and 93f22d8.

⛔ Files ignored due to path filters (1)
  • pacquet/crates/package-manager/src/install/snapshots/pacquet_package_manager__install__tests__should_install_dependencies.snap is excluded by !**/*.snap
📒 Files selected for processing (10)
  • pacquet/crates/cli/tests/_utils.rs
  • pacquet/crates/cli/tests/install.rs
  • pacquet/crates/cli/tests/pnpm_compatibility.rs
  • pacquet/crates/package-manager/src/install.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/package-manager/src/install_package_from_registry.rs
  • pacquet/crates/package-manager/src/install_package_from_registry/tests.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pacquet/crates/package-manager/src/virtual_store_layout.rs
  • pacquet/crates/testing-utils/src/bin.rs
💤 Files with no reviewable changes (1)
  • pacquet/crates/cli/tests/pnpm_compatibility.rs
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Lint and Test (windows-latest)
  • GitHub Check: Lint and Test (macos-latest)
  • GitHub Check: Lint and Test (ubuntu-latest)
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Code Coverage
  • GitHub Check: Compile & Lint
🧰 Additional context used
📓 Path-based instructions (2)
pacquet/**/*.rs

📄 CodeRabbit inference engine (pacquet/AGENTS.md)

pacquet/**/*.rs: When porting a function that fires pnpm:<channel> events through globalLogger, logger.debug(), or streamParser.write(), mirror the call site, payload, and ordering so the reporter parses pacquet's NDJSON the same way it parses pnpm's.
Declare a newtype wrapper for branded string types. Do not collapse the brand into a plain String or &str.
If upstream always validates before construction, validate in pacquet's wrapper too. The wrapper must construct only via TryFrom<String> and/or FromStr. Do not provide an infallible public constructor.
If upstream never validates, just brand for type-safety. Expose an infallible From<String> (and From<&str> when convenient).
If upstream occasionally constructs without validation, expose from_str_unchecked as an escape hatch alongside the validating constructor.
Match upstream serde behavior for branded types that cross JSON, YAML, or INI boundaries. Use #[serde(try_from = "String")] for deserialization and #[serde(into = "String")] for serialization.
Use #[derive(derive_more::From)] and #[derive(derive_more::Into)] for mechanical conversion impls. Fall back to manual impl only when conversion needs custom logic.
String-literal unions should become enums, not newtype wrappers. Model closed sets of valid string values as enums.
Template literal types should be treated as branded strings with validation discipline from rules 2-5.
Choose owned vs. borrowed parameters to minimize copies. Widen to the most encompassing type (&Path over &PathBuf, &str over &String) when it doesn't force extra copies.
Prefer Arc::clone(&x) / Rc::clone(&x) over x.clone() for reference-counted types, so the cost is visible at the call site.
Follow Rust API Guidelines for naming conventions.
Do not use star imports inside module bodies. Write use super::{Foo, bar} instead of use super::*;. Two forms stay allowed: external-crate preludes like use rayon::prelude::*; and root-of-module re-...

Files:

  • pacquet/crates/testing-utils/src/bin.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/cli/tests/_utils.rs
  • pacquet/crates/package-manager/src/virtual_store_layout.rs
  • pacquet/crates/cli/tests/install.rs
  • pacquet/crates/package-manager/src/install.rs
  • pacquet/crates/package-manager/src/install_package_from_registry.rs
  • pacquet/crates/package-manager/src/install_package_from_registry/tests.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
pacquet/**/{tests,test}/**/*.rs

📄 CodeRabbit inference engine (pacquet/AGENTS.md)

pacquet/**/{tests,test}/**/*.rs: Prefer real fixtures; reach for the dependency-injection seam only when they can't cover the branch. Most happy paths and error paths should be tested with tempfile::TempDir, the mocked registry, or an integration test that spawns the actual binary.
Use the DI seam — a capability trait on the Host provider, threaded as Sys: <Bounds> — only for branches a real fixture can't reach portably: filesystem error kinds, deterministic time, shared process-global state, or external-service happy paths.
Log before non-assert_eq! assertions, dbg! complex structures, skip logging for simple scalar assert_eq!. Follow the test-logging guidance in CODE_STYLE_GUIDE.md.
Tests must not be tolerant of missing build/runtime environment by silently returning early when a tool isn't found. If the test needs a tool, let it panic when the tool is absent.
Prefer #[cfg_attr(target_os = "windows", ignore = "...")] (or #[cfg(unix)]) over a runtime probe-and-skip helper for platform-locked tools.
Port relevant tests from pnpm when porting behavior. Matching test coverage is the easiest way to prove behavioral parity.
When porting behavior from pnpm, consult plans/TEST_PORTING.md before adding ported tests. Use allow_known_failure! at the not-yet-implemented boundary and update checkboxes as items land.

Files:

  • pacquet/crates/cli/tests/_utils.rs
  • pacquet/crates/cli/tests/install.rs
🧠 Learnings (2)
📚 Learning: 2026-05-20T19:40:55.051Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11774
File: pacquet/crates/resolving-deps-resolver/src/resolve_peers.rs:0-0
Timestamp: 2026-05-20T19:40:55.051Z
Learning: In the pacquet Rust code, ensure the semver implementation uses the `node-semver` crate (not `nodejs-semver`). `node-semver`’s public API does not include a `satisfies_with_prerelease`-style method; prerelease-tolerant matching should be implemented inline by first calling `Range::satisfies`, and when it rejects a prerelease version, retry matching against a stripped `MAJOR.MINOR.PATCH` base of the prerelease version.

Applied to files:

  • pacquet/crates/testing-utils/src/bin.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/cli/tests/_utils.rs
  • pacquet/crates/package-manager/src/virtual_store_layout.rs
  • pacquet/crates/cli/tests/install.rs
  • pacquet/crates/package-manager/src/install.rs
  • pacquet/crates/package-manager/src/install_package_from_registry.rs
  • pacquet/crates/package-manager/src/install_package_from_registry/tests.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
📚 Learning: 2026-05-20T23:07:58.444Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11784
File: pacquet/crates/resolving-deps-resolver/src/hoist_peers.rs:120-133
Timestamp: 2026-05-20T23:07:58.444Z
Learning: When reviewing code in this pacquet Rust port, follow the upstream pnpm compatibility rule: only match pnpm’s behavior exactly. Do not propose review changes that intentionally deviate from pnpm’s documented/observed behavior, even if pnpm appears buggy. If you identify a real bug in pnpm behavior, the review should prioritize fixing it upstream in pnpm first, and avoid implementing a pnpm-behavior workaround here unless the same fix has already landed upstream.

Applied to files:

  • pacquet/crates/testing-utils/src/bin.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/cli/tests/_utils.rs
  • pacquet/crates/package-manager/src/virtual_store_layout.rs
  • pacquet/crates/cli/tests/install.rs
  • pacquet/crates/package-manager/src/install.rs
  • pacquet/crates/package-manager/src/install_package_from_registry.rs
  • pacquet/crates/package-manager/src/install_package_from_registry/tests.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
🔇 Additional comments (17)
pacquet/crates/cli/tests/_utils.rs (1)

4-24: LGTM!

pacquet/crates/testing-utils/src/bin.rs (1)

69-82: LGTM!

pacquet/crates/package-manager/src/install_package_from_registry.rs (1)

21-62: LGTM!

Also applies to: 98-137

pacquet/crates/package-manager/src/install_package_from_registry/tests.rs (1)

143-167: LGTM!

Also applies to: 226-267, 340-357, 444-458

pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs (4)

151-156: LGTM!


742-765: LGTM!


797-814: LGTM!

Also applies to: 842-842, 629-642


488-531: Silent node-probe fallback to engine_name: None is intentional

  • The code intentionally degrades to None on spawn_blocking/detect_node_major failure (JoinError + detection failure both map to None), and VirtualStoreLayout::new explicitly relies on preserving the Option shape because None vs Some("") produce different GVS hashes.
  • When engine_name is None, BuildModules disables the side-effects cache (engine_name.is_some() gates both read/write), matching the documented “avoid poisoning the cache/GVS hash” behavior used elsewhere (installability synthetic fallback + node_detected flag).
  • No warning is currently emitted for this probe-failure path, consistent with the existing design that treats undetected Node as a safe fallback (and intentionally bypasses cache/GVS engine contributions rather than failing or logging noise).
pacquet/crates/package-manager/src/virtual_store_layout.rs (1)

89-96: LGTM!

pacquet/crates/package-manager/src/install.rs (2)

640-677: LGTM!


717-735: LGTM!

pacquet/crates/package-manager/src/install/tests.rs (1)

82-92: LGTM!

pacquet/crates/cli/tests/install.rs (5)

449-470: LGTM!


472-479: LGTM!


481-482: LGTM!


484-493: LGTM!


505-506: LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pacquet: honor enableGlobalVirtualStore in the fresh-resolve install path

2 participants