Repository navigation
Description
Follow-ups to #2446, which runs the rule for a pnpm store entry that nothing links (#2353) on Windows. None of them changes what the rule does on Linux or macOS.
Links through a drive that is missing from the session
A mapped or subst drive is there for one session and not for another (an elevated shell does not see it). #2446 already keeps every entry when a link's own target names such a drive. Two paths miss that check, found by code review. Both rest on the same premise as the existing check, that a link into a missing drive fails with ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND; that code has not been measured.
- The
node_modulesabove a linked file. For a link to a file outside the project,vexlooks for anode_modulesin each directory above the file. Anode_modulesthere that is a junction into a missing drive reads as "nonode_modules", so the store is judged in that session and every entry is kept in the other. The lookup should treat such a junction the waylink_leads_nowheretreats a link in the project. - A link whose path passes through a second link.
link_leads_nowherereads the first hop only. A relative link whose target path passes through a junction into a missing drive is left out as a link that leads nowhere. The target should be resolved level by level, with the drive check on each link on the way.
Following a link out of the project on Windows
#2443 follows a link to a directory outside the project (a link: dependency on another checkout, Bazel's bazel-* links). On Windows such a link still keeps every entry, because following was never run there. Turning it on needs the tests of #2443 to run with junctions on a Windows runner. Until then a Bazel workspace on Windows keeps the old behaviour.
Tests
test_link_into_a_drive_that_is_not_there_does_not_lead_nowherereturns early where a junction into a missing drive letter cannot be made, and a passing test prints nothing. Whether it has ever made one on a runner is not known. It should fail on a runner where it cannot, or make the junction another way.test_pnpm_store_linked_with_symbolic_links_is_judged_on_windowsfails on any Actions runner that cannot make a symbolic link, also a self-hosted one without the privilege. It should key on something this repository's workflow sets.- The home directory is told by its file identity as well as by its path. On a volume whose driver gives every directory the same identity (not verified that one exists), a directory could be taken for the home directory, which ends the
node_moduleslookup above a linked file early. Requiring the path to match there would close it.
Not run on Windows
- The vendored in-place leg (
e2e_vendor_pnpm_buildhas no Windows runner leg). - Real pnpm writing junctions: the runner may make symbolic links, so pnpm wrote those.
Activity