Repository navigation
Replies: 1 comment
|
I’d vote for URLs as a unified, cross-platform internal representation, with native path conversion only at external boundaries.
The representation would be consistent across platforms; filesystem-specific comparison rules would still need explicit handling. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Align Rust path utilities and resolver behavior with webpack. Baseline: Rspack
f03bd2f4f3, webpack5.110.3, enhanced-resolve5.24.5, Node.js24.16.0.C:\project, resourceC:\project\src\a.js../C:/project/src/a.js./src/a.jsC:\project, resourceD:\lib\a.js../D:/lib/a.jsD:\lib\a.jsmake_paths_absolute/workspace/app, request../a.js/workspace/app/../a.js/workspace/a.jsnode_join_win32vspath.win32.joinC:\project+../src/a.jsC:\project\../src/a.jsC:\src\a.jsC:\project\a.jsresolve.restrictionsC:\APP, candidateC:\app\a.jsThe first four rows were reproduced with helper-level probes on macOS. The last two are source-level comparisons; resolver end-to-end behavior and Windows integration still need verification. Rspack's JS identifier helpers matched webpack in the sampled cases. Explicit Windows normalization and join followed by normalization also matched Node.
Implementation tasks:
make_paths_absolutelikepath.join, including source-map module-identifier lookup.resolve.restrictionswith enhanced-resolve's Windows case handling.node_joinsemantics and normalize call sites requiring Node's join behavior, especially asset output and source-map paths.Prioritize normalization and restrictions. Reuse existing JS integration suites to cover drive letters, mixed separators, UNC paths,
./.., and case differences. UNC paths remaining unchanged inabsoluteToRequestare shared webpack behavior, not a Rspack-specific gap.All reactions