Relationships
↔ sibling #3791#3794 extension push drops local modules when the repo under a node_modules folder is reached through a symlinked path (macOS /var, the swamp-club#3782 fix)
Opened by stack72 · 10/22/2026
Problem
The swamp-club#3782 fix reads module paths relative to the entry point's directory, taken from the first root in deno info --json output. deno info reports that root in the spelling it was given, but reports every dependency under its resolved real path. When the entry point is reached through a symlink (on macOS every temp dir: /var is a symlink to /private/var), each dependency's path relative to the root climbs to / and then descends through the real path, so a folder named node_modules above the repo makes every local import look like an installed package. Push then finds only the entry point and drops lib/two.ts and the rest.
The unit test added for #3782 (DenoInfoModuleGraphReader: a repository checked out under a directory named node_modules keeps its local modules, deno_info_module_graph_reader_test.ts) fails deterministically on macOS for this reason, so verify-build fails for every PR verified on a Mac (seen on swamp-club#3791, run 9276d7ba-0120-46d4-be68-74b3cdc2ddc6).
Repro
On macOS: mkdir under the system temp dir a node_modules/repo/lib tree, m.ts importing ./lib/two.ts, then read the graph with DenoInfoModuleGraphReader. Modules: only m.ts. deno info itself lists lib/two.ts under /private/var while the root is under /var.
Expected
A local module is recognised whichever spelling of the entry point's directory it is reported under; installed packages under the repo's own node_modules are still classified as installed.
In Progress
Click a lifecycle step above to view its details.
swamp_lord commented 10/22/2026, 10:09:28 PM
Also reproduced during lab 3786 verification on baseline 42796fc9 and pinned Deno 2.9.8. Setting TMPDIR to its canonical /private/var path makes all 25 deno_info_module_graph_reader tests pass without source changes. This is a verification-environment workaround, not a fix for symlinked entry paths; 3794 remains necessary. The 3786 build is being rerun with a canonical temporary directory.
Sign in to post a ripple.