Skip to content

fix: create global virtual store symlinks with native path separators on Windows - #12976

Merged
zkochan merged 1 commit into
mainfrom
fix/gvs-windows-separators
Jul 13, 2026
Merged

zkochan merged 1 commit into
mainfrom
fix/gvs-windows-separators

Conversation

@zkochan

@zkochan zkochan commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Problem

pnpm install (pacquet engine) aborts on Windows whenever the global virtual store is enabled — which broke Rust CI / Test / windows on main and every PR:

Failed to create symlink at "...\store\v11\links\@/arraybuffer.prototype.slice/1.0.4/<hash>\node_modules\es-abstract"
  ╰─▶ The directory name is invalid. (os error 267)

Note the separators in that path: native \ up to …\links, then forward slashes for the rest.

Root cause

The global-virtual-store slot suffix is produced by format_global_virtual_store_path as @/<name>/<version>/<hash>, which always uses / because it doubles as a cross-platform canonical id (it feeds hashing and lockfile comparison). It was joined onto the store dir with a plain PathBuf::join, which preserves / on Windows. Those forward slashes then reached CreateSymbolicLinkW, and Windows' reparse-point APIs reject forward-slash paths with ERROR_DIRECTORY (os error 267). The junction fallback only kicks in on PermissionDenied, so a 267 propagated straight up.

Unix is unaffected because / is already the native separator — which is why only Windows broke.

Fix

Add a join_global_virtual_store_path(base, rel) helper that expands the /-separated suffix into native path components, and route the slot-path join sites through it:

  • VirtualStoreLayout::slot_dir — the choke point every symlink target/link path flows through
  • the two config-deps installer joins in install_config_deps.rs

No-op on Unix; produces \ paths on Windows. Covered by a new unit test in graph-hasher; existing slot_dir/env-installer tests still pass.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed Windows installation failures when the global virtual store is enabled by ensuring filesystem paths use native separators during symlink operations.
    • Improved cross-platform path handling for node_modules layout and related symlink targets when global virtual store paths are derived.
  • Tests
    • Added unit coverage to confirm global virtual store path joining expands slash-formatted suffixes into native path components.

Copilot AI review requested due to automatic review settings July 13, 2026 16:13

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

zkochan has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix Windows GVS symlink creation by expanding /-separated slot paths

🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Expand global-virtual-store slot suffix into native path components before filesystem calls.
• Route GVS slot joins in virtual store layout and config-deps installer through the new helper.
• Add a unit test to prevent forward-slash paths from reaching Windows symlink APIs.
Diagram

graph TD
  A["env-installer"] --> B["join_global_virtual_store_path"] --> C{{"Windows symlink API"}}
  D["package-manager"] --> B
  E["graph-hasher"] --> B
  E --> F["unit tests"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Windows-only string replacement (rel.replace('/', "\\"))
  • ➕ Very small change localized to the join sites
  • ➖ String-level normalization is easier to get wrong (escaping, edge cases)
  • ➖ Still treats a path as an opaque string instead of components
2. Return a PathBuf from the formatter (store canonical id separately)
  • ➕ Eliminates the stringly-typed path entirely for filesystem operations
  • ➕ Clear separation between canonical id and filesystem path
  • ➖ Broader refactor: touches hashing/lockfile comparison inputs and call sites
  • ➖ Higher risk and more review surface for a hot path
3. Normalize at the OS boundary (just before symlink creation)
  • ➕ Single choke point if all symlinks/junctions flow through one function
  • ➖ May miss other filesystem uses of the slot path
  • ➖ Harder to reason about correctness when paths are partially normalized

Recommendation: The chosen approach (a small helper that expands the canonical /-separated suffix into native components) is the best tradeoff: it preserves the cross-platform canonical id for hashing/lockfile comparisons while guaranteeing filesystem paths are valid on Windows. It also centralizes the fix in a reusable function and is covered by a focused regression test.

Files changed (6) +68 / -5

Enhancement (2) +22 / -0
global_virtual_store_path.rsAdd join_global_virtual_store_path helper to expand '/'-separated suffix +21/-0

Add join_global_virtual_store_path helper to expand '/'-separated suffix

• Adds a small helper that splits the canonical GVS relative path on '/' and extends a base PathBuf with the resulting components. Documents the Windows CreateSymbolicLinkW failure when forward slashes survive into the final slot path.

pnpm/crates/graph-hasher/src/global_virtual_store_path.rs

lib.rsRe-export join_global_virtual_store_path from graph-hasher +1/-0

Re-export join_global_virtual_store_path from graph-hasher

• Exports the new join helper so other crates can consistently build filesystem-safe GVS paths.

pnpm/crates/graph-hasher/src/lib.rs

Bug fix (2) +16 / -5
install_config_deps.rsUse native-component join for GVS paths during config/optional dep install +7/-3

Use native-component join for GVS paths during config/optional dep install

• Replaces direct PathBuf::join of the '/'-formatted GVS suffix with join_global_virtual_store_path when building leaf and optional subdep paths. Prevents forward slashes from propagating into node_modules/symlink operations on Windows.

pnpm/crates/env-installer/src/install_config_deps.rs

virtual_store_layout.rsBuild GVS slot_dir via native-component join +9/-2

Build GVS slot_dir via native-component join

• Routes VirtualStoreLayout::slot_dir through join_global_virtual_store_path so all GVS slot paths (and downstream symlink/junction calls) use native separators on Windows. Keeps the non-GVS fallback behavior equivalent since it contains no '/' segments.

pnpm/crates/package-manager/src/virtual_store_layout.rs

Tests (1) +25 / -0
tests.rsAdd regression test ensuring GVS join produces native separators +25/-0

Add regression test ensuring GVS join produces native separators

• Adds a unit test validating that joining a formatted GVS suffix yields the expected number of components and does not retain forward slashes in the appended tail (except on Unix where '/' is native).

pnpm/crates/graph-hasher/src/global_virtual_store_path/tests.rs

Documentation (1) +5 / -0
gvs-windows-separators.mdAdd changeset noting Windows GVS install fix +5/-0

Add changeset noting Windows GVS install fix

• Introduces a patch changeset describing the Windows failure mode (forward slashes in GVS slot paths) and the fix (expand into native path components before filesystem calls).

.changeset/gvs-windows-separators.md

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@zkochan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 735b2879-607a-42ca-bacb-30182d63a379

📥 Commits

Reviewing files that changed from the base of the PR and between 51a60f5 and 2a6db32.

📒 Files selected for processing (6)
  • .changeset/gvs-windows-separators.md
  • pnpm/crates/env-installer/src/install_config_deps.rs
  • pnpm/crates/graph-hasher/src/global_virtual_store_path.rs
  • pnpm/crates/graph-hasher/src/global_virtual_store_path/tests.rs
  • pnpm/crates/graph-hasher/src/lib.rs
  • pnpm/crates/package-manager/src/virtual_store_layout.rs
📝 Walkthrough

Walkthrough

Global virtual store path construction now expands slash-separated suffixes into native path components. Virtual store slot paths and config dependency directories use the shared helper, which is re-exported and covered by a platform-aware unit test.

Changes

Global virtual store native path handling

Layer / File(s) Summary
Path helper and validation
pnpm/crates/graph-hasher/src/global_virtual_store_path.rs, pnpm/crates/graph-hasher/src/global_virtual_store_path/tests.rs, pnpm/crates/graph-hasher/src/lib.rs
Adds and re-exports join_global_virtual_store_path, with a platform-aware test confirming slash-separated suffixes become native path components.
Virtual store slot integration
pnpm/crates/package-manager/src/virtual_store_layout.rs
VirtualStoreLayout::slot_dir uses the helper when constructing GVS slot directories.
Config dependency path integration
pnpm/crates/env-installer/src/install_config_deps.rs, .changeset/gvs-windows-separators.md
Config dependency and optional subdependency paths use native GVS joining, with a changeset documenting the Windows fix.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • pnpm/pnpm#12039: Both modify GVS slot path construction in virtual_store_layout.rs.

Suggested labels: product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/gvs-windows-separators

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.

Copilot AI review requested due to automatic review settings July 13, 2026 16:17
@zkochan
zkochan force-pushed the fix/gvs-windows-separators branch from 916504e to 51a60f5 Compare July 13, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

zkochan has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Expand scoped package names to prevent forward slashes

Use join_global_virtual_store_path to expand name into native path components,
preventing forward slashes in paths for scoped packages.

pnpm/crates/env-installer/src/install_config_deps.rs [77-80]

 let leaf_node_modules =
     join_global_virtual_store_path(&global_virtual_store_dir, &rel_path)
         .join("node_modules");
-let pkg_dir_in_gvs = leaf_node_modules.join(name);
+let pkg_dir_in_gvs = join_global_virtual_store_path(&leaf_node_modules, name);
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that name can be a scoped package containing a forward slash, which would trigger the exact Windows ERROR_DIRECTORY issue this PR aims to fix.

High
Expand scoped subdep names to prevent forward slashes

Use join_global_virtual_store_path to expand subdep.name into native path
components to prevent forward slashes for scoped sub-dependencies.

pnpm/crates/env-installer/src/install_config_deps.rs [252-254]

 let subdep_dir = join_global_virtual_store_path(global_virtual_store_dir, &subdep_rel)
-    .join("node_modules")
-    .join(&subdep.name);
+    .join("node_modules");
+let subdep_dir = join_global_virtual_store_path(&subdep_dir, &subdep.name);
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion accurately catches that subdep.name can be a scoped package containing a forward slash, which would trigger the same Windows symlink failure the PR resolves.

High
General
Filter and push each segment

Filter out empty string segments before pushing them to the path buffer.

pnpm/crates/graph-hasher/src/global_virtual_store_path.rs [161]

-path.extend(rel.split('/'));
+for segment in rel.split('/') {
+    if !segment.is_empty() {
+        path.push(segment);
+    }
+}
  • Apply / Chat
Suggestion importance[1-10]: 1

__

Why: Rust's PathBuf::extend internally calls push, which already ignores empty string components, making this explicit filtering redundant and offering no functional benefit.

Low
  • More

… on Windows

The global-virtual-store slot suffix is formatted as `@/<name>/<version>/<hash>`
with `/` separators because it doubles as a cross-platform canonical id (it
feeds hashing and lockfile comparison). Joining it onto the store dir with a
plain `PathBuf::join` preserved those forward slashes on Windows, and they then
reached `CreateSymbolicLinkW`, which rejects forward-slash paths with
`ERROR_DIRECTORY` (os error 267) — aborting `pnpm install` on Windows whenever
the global virtual store is enabled.

Add a `join_global_virtual_store_path` helper that expands the `/`-separated
suffix into native path components, and route the slot-path join sites through
it (`VirtualStoreLayout::slot_dir` plus the two config-deps installer joins).
No-op on Unix; produces `\` paths on Windows.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 13, 2026 16:23
@zkochan
zkochan force-pushed the fix/gvs-windows-separators branch from 51a60f5 to 2a6db32 Compare July 13, 2026 16:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

zkochan has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@zkochan
zkochan merged commit c03b2d4 into main Jul 13, 2026
25 of 29 checks passed
@zkochan
zkochan deleted the fix/gvs-windows-separators branch July 13, 2026 16:30
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Action required

1. Changeset missing pnpm bump 📘 Rule violation § Compliance
Description
The new changeset only declares a version bump for pacquet and omits the required pnpm entry.
This violates the repository changeset policy and may cause incorrect or incomplete release
planning.
Code

.changeset/gvs-windows-separators.md[R1-3]

+---
+"pacquet": patch
+---
Evidence
PR Compliance ID 713436 requires each changeset to include a pnpm package entry with a valid bump
type. The added changeset front-matter contains only "pacquet": patch and omits pnpm.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/gvs-windows-separators.md[1-3]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset `.changeset/gvs-windows-separators.md` is missing a required `pnpm` front-matter entry.

## Issue Context
Per the changeset compliance rule, every changeset must explicitly declare a bump type for the `pnpm` package (`patch`/`minor`/`major`). This PR adds a changeset with only `"pacquet": patch`.

## Fix Focus Areas
- .changeset/gvs-windows-separators.md[1-3]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Nonsemver version breaks slots 🐞 Bug ≡ Correctness
Description
join_global_virtual_store_path expands / into native components but does not ensure each
resulting segment is Windows-valid, so a VersionPart::NonSemver like a tarball/git URL (contains
: and /) can still produce an invalid/unexpected GVS slot path on Windows. This can abort
installs when GVS is enabled and any dependency’s lockfile key uses a non-semver version string.
Code

pnpm/crates/graph-hasher/src/global_virtual_store_path.rs[R161-164]

+pub fn join_global_virtual_store_path(base: &Path, rel: &str) -> PathBuf {
+    let mut path = base.to_path_buf();
+    path.extend(rel.split('/'));
+    path
Evidence
Non-semver versions are explicitly preserved as raw URL-like strings in lockfile keys, and the
current GVS version-segment derivation passes them through verbatim; the PR’s new join helper only
splits on / and does not escape : or prevent extra components from embedded /, despite
existing code comments noting :// in the slot path are rejected on Windows.

pnpm/crates/lockfile/src/pkg_ver_peer.rs[6-21]
pnpm/crates/package-manager/src/virtual_store_layout.rs[371-385]
pnpm/crates/graph-hasher/src/global_virtual_store_path.rs[147-165]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
On Windows, the newly introduced `join_global_virtual_store_path` fixes `/` separators by splitting on `/`, but it still allows Windows-invalid characters and path-shaping substrings to survive in individual path components. In particular, `PkgVerPeer::VersionPart::NonSemver` is documented to preserve raw tarball/git URLs (which typically contain `:` and `/`). `gvs_version_segment` currently passes `NonSemver` through verbatim, so GVS slot paths can still become invalid on Windows (or gain extra path components from embedded `/`).

## Issue Context
- `VersionPart::NonSemver` preserves raw URL-like strings.
- `gvs_version_segment` passes `NonSemver` directly into the `<version>` segment, and the file already documents that `:` and embedded `/` are rejected by Windows.
- With this PR, Windows now reaches these code paths instead of failing earlier due to forward slashes.

## Fix Focus Areas
- pnpm/crates/package-manager/src/virtual_store_layout.rs[371-386]
- pnpm/crates/graph-hasher/src/global_virtual_store_path.rs[147-165]

### Suggested fix
Prefer fixing at the source of the `<version>` segment:
- Update `gvs_version_segment` so `VersionPart::NonSemver(_)` does **not** flow verbatim into the filesystem path. For example:
 - map `NonSemver(_)` to a stable safe string like `"undefined"` / `"nonsemver"`, **or**
 - map to a deterministic encoded form (e.g., replace Windows-invalid characters, or use a short hash suffix) so it stays Windows-safe without exploding path depth.

Optionally add/extend a unit test to cover a NonSemver version containing `https://...` and assert the resulting slot dir contains no `:` and does not gain extra components from the URL’s `/`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +1 to +3
---
"pacquet": patch
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Changeset missing pnpm bump 📘 Rule violation § Compliance

The new changeset only declares a version bump for pacquet and omits the required pnpm entry.
This violates the repository changeset policy and may cause incorrect or incomplete release
planning.
Agent Prompt
## Issue description
The changeset `.changeset/gvs-windows-separators.md` is missing a required `pnpm` front-matter entry.

## Issue Context
Per the changeset compliance rule, every changeset must explicitly declare a bump type for the `pnpm` package (`patch`/`minor`/`major`). This PR adds a changeset with only `"pacquet": patch`.

## Fix Focus Areas
- .changeset/gvs-windows-separators.md[1-3]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +161 to +164
pub fn join_global_virtual_store_path(base: &Path, rel: &str) -> PathBuf {
let mut path = base.to_path_buf();
path.extend(rel.split('/'));
path

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Nonsemver version breaks slots 🐞 Bug ≡ Correctness

join_global_virtual_store_path expands / into native components but does not ensure each
resulting segment is Windows-valid, so a VersionPart::NonSemver like a tarball/git URL (contains
: and /) can still produce an invalid/unexpected GVS slot path on Windows. This can abort
installs when GVS is enabled and any dependency’s lockfile key uses a non-semver version string.
Agent Prompt
## Issue description
On Windows, the newly introduced `join_global_virtual_store_path` fixes `/` separators by splitting on `/`, but it still allows Windows-invalid characters and path-shaping substrings to survive in individual path components. In particular, `PkgVerPeer::VersionPart::NonSemver` is documented to preserve raw tarball/git URLs (which typically contain `:` and `/`). `gvs_version_segment` currently passes `NonSemver` through verbatim, so GVS slot paths can still become invalid on Windows (or gain extra path components from embedded `/`).

## Issue Context
- `VersionPart::NonSemver` preserves raw URL-like strings.
- `gvs_version_segment` passes `NonSemver` directly into the `<version>` segment, and the file already documents that `:` and embedded `/` are rejected by Windows.
- With this PR, Windows now reaches these code paths instead of failing earlier due to forward slashes.

## Fix Focus Areas
- pnpm/crates/package-manager/src/virtual_store_layout.rs[371-386]
- pnpm/crates/graph-hasher/src/global_virtual_store_path.rs[147-165]

### Suggested fix
Prefer fixing at the source of the `<version>` segment:
- Update `gvs_version_segment` so `VersionPart::NonSemver(_)` does **not** flow verbatim into the filesystem path. For example:
  - map `NonSemver(_)` to a stable safe string like `"undefined"` / `"nonsemver"`, **or**
  - map to a deterministic encoded form (e.g., replace Windows-invalid characters, or use a short hash suffix) so it stays Windows-safe without exploding path depth.

Optionally add/extend a unit test to cover a NonSemver version containing `https://...` and assert the resulting slot dir contains no `:` and does not gain extra components from the URL’s `/`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@github-actions

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.00     23.4±0.17ms    16.0 MB/sec    1.02     23.9±1.15ms    15.6 MB/sec
packument/parse                1.00     79.9±3.65µs   829.9 MB/sec    1.00     79.6±0.63µs   833.7 MB/sec
tarball/download_dependency    1.01      6.6±0.26ms   655.2 KB/sec    1.00      6.5±0.11ms   663.6 KB/sec

eagarwal-notion added a commit to eagarwal-notion/pnpm that referenced this pull request Jul 13, 2026
The windows Rust job fails in its setup install: the published
pnpm v12.0.0-alpha.9 predates the mixed-separator store symlink fix
(pnpm#12976), so cold-cache runners hit it. Main's latest run
passed the same step on a warm cache — retriggering for another roll
until an alpha carrying the fix is published.

Co-Authored-By: Claude Fable 5 <[email protected]>
zkochan pushed a commit to eagarwal-notion/pnpm that referenced this pull request Jul 13, 2026
The windows Rust job fails in its setup install: the published
pnpm v12.0.0-alpha.9 predates the mixed-separator store symlink fix
(pnpm#12976), so cold-cache runners hit it. Main's latest run
passed the same step on a warm cache — retriggering for another roll
until an alpha carrying the fix is published.

Co-Authored-By: Claude Fable 5 <[email protected]>
zkochan pushed a commit to eagarwal-notion/pnpm that referenced this pull request Jul 13, 2026
The windows Rust job fails in its setup install: the published
pnpm v12.0.0-alpha.9 predates the mixed-separator store symlink fix
(pnpm#12976), so cold-cache runners hit it. Main's latest run
passed the same step on a warm cache — retriggering for another roll
until an alpha carrying the fix is published.

Co-Authored-By: Claude Fable 5 <[email protected]>
zkochan added a commit that referenced this pull request Jul 14, 2026
A scoped dependency's node_modules/@scope/name link path is built by
joining the whole @scope/name alias as one segment. Rust's Path::join
appends segments verbatim (unlike Node's path.join, which normalizes),
so the / inside the alias survived into an otherwise \-separated Windows
path and reached CreateSymbolicLinkW, which rejects forward-slash paths
— the long store paths reach it in verbatim \\?\ form where / is a
literal filename byte — with ERROR_DIRECTORY (os error 267), aborting
the install.

This is the same failure class as the global-virtual-store slot-path fix
in #12976, which normalized the slot suffix at its construction
sites. Rather than chase every join site, rewrite paths to native
separators at the symlink writer's own choke points: symlink_dir
(covering the hoisted linker's direct calls) and force_symlink_dir's
entry (so its read_link / remove_dir / rename / create_dir_all retry
steps all see a native path too). The rewrite only allocates when a /
is actually present and is a no-op on Unix.

The TypeScript CLI is unaffected: Node's path.join already normalizes
separators on Windows, so no counterpart change is needed.
eagarwal-notion added a commit to eagarwal-notion/pnpm that referenced this pull request Jul 14, 2026
The windows Rust job fails in its setup install: the published
pnpm v12.0.0-alpha.9 predates the mixed-separator store symlink fix
(pnpm#12976), so cold-cache runners hit it. Main's latest run
passed the same step on a warm cache — retriggering for another roll
until an alpha carrying the fix is published.

Co-Authored-By: Claude Fable 5 <[email protected]>
eagarwal-notion added a commit to eagarwal-notion/pnpm that referenced this pull request Jul 15, 2026
The windows Rust job fails in its setup install: the published
pnpm v12.0.0-alpha.9 predates the mixed-separator store symlink fix
(pnpm#12976), so cold-cache runners hit it. Main's latest run
passed the same step on a warm cache — retriggering for another roll
until an alpha carrying the fix is published.

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants