Summary
On macOS, the same temporary project can be spelled as both /var/... and /private/var/.... ttscgraph currently compares those lexical spellings when mapping source files into dump coordinates.
Reproduction
- Run the graph feature suite from a checkout under the macOS temporary directory.
- Let the project root and a compiler-reported source resolve through different
/var aliases.
- Observe project files emitted outside the project-relative coordinate space.
On current master (047b464), this fails:
test_ttscgraph_dump_keeps_node_modules_as_external_leaves
test_ttscgraph_dump_resolves_pnpm_workspace_edges
Expected
Filesystem aliases for the same existing path produce one project-relative graph coordinate.
Actual
A source under the project is treated as a sibling outside it, so graph lookup cannot find the expected package or workspace nodes.
Proposed fix
Resolve existing absolute filesystem paths through filepath.EvalSymlinks before applying the portable TypeScript path grammar, with lexical fallback for non-existent paths and synthetic Windows or UNC fixtures. Add a real symlink regression test.
Summary
On macOS, the same temporary project can be spelled as both
/var/...and/private/var/....ttscgraphcurrently compares those lexical spellings when mapping source files into dump coordinates.Reproduction
/varaliases.On current
master(047b464), this fails:test_ttscgraph_dump_keeps_node_modules_as_external_leavestest_ttscgraph_dump_resolves_pnpm_workspace_edgesExpected
Filesystem aliases for the same existing path produce one project-relative graph coordinate.
Actual
A source under the project is treated as a sibling outside it, so graph lookup cannot find the expected package or workspace nodes.
Proposed fix
Resolve existing absolute filesystem paths through
filepath.EvalSymlinksbefore applying the portable TypeScript path grammar, with lexical fallback for non-existent paths and synthetic Windows or UNC fixtures. Add a real symlink regression test.