GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — module,win: fix long path resolve by StefanStojanovic · Pull Request #51097 · nodejs/node Conversation
anonrig
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a test so we don't regress?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
StefanStojanovic
force-pushed
the
mefi-resolve-long-path
branch
from
e74bcf7 to
ec2ea14
Compare
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
joyeecheung
reviewed
|
| if (StringPrototypeCharCodeAt(resolvedPath, 0) === CHAR_BACKWARD_SLASH) { | |
| // Possible UNC root | |
| if (StringPrototypeCharCodeAt(resolvedPath, 1) === CHAR_BACKWARD_SLASH) { | |
| const code = StringPrototypeCharCodeAt(resolvedPath, 2); | |
| if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { | |
| // Matched non-long UNC root, convert the path to a long UNC path | |
| return `\\\\?\\UNC\\${StringPrototypeSlice(resolvedPath, 2)}`; | |
| } | |
| } | |
| } else if ( | |
| isWindowsDeviceRoot(StringPrototypeCharCodeAt(resolvedPath, 0)) && | |
| StringPrototypeCharCodeAt(resolvedPath, 1) === CHAR_COLON && | |
| StringPrototypeCharCodeAt(resolvedPath, 2) === CHAR_BACKWARD_SLASH | |
| ) { | |
| // Matched device root, convert the path to a long UNC path | |
| return `\\\\?\\${resolvedPath}`; | |
| } |
We should probably port the entire logic over (with a helper that's named something like ToNamespacedPath declared in either util.h or node_internals.h)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@joyeecheung do you think this can land as a fix with a regression test added and then a follow-up PR can be opened for porting |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, with a TODO/FIXME comment. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ec2ea14 to
3f957e8
Compare
|
@joyeecheung LGTY now? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e72e49a to
4e651a1
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
4e651a1 to
93dc8cb
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@joyeecheung can you add the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@StefanStojanovic @joyeecheung any chance of getting this released in one of the next patch or minor releases? It's been a while since my original issue in Nov 2023 and users keep running into this (eg. with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Commit Queue failed- Loading data for nodejs/node/pull/51097 ✔ Done loading data for nodejs/node/pull/51097 ----------------------------------- PR info ------------------------------------ Title module,win: fix long path resolve (#51097) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch StefanStojanovic:mefi-resolve-long-path -> nodejs:main Labels c++, fs, needs-ci Commits 1 - module,win: fix long path resolve Committers 1 - StefanStojanovic PR-URL: https://github.com/nodejs/node/pull/51097 Fixes: https://github.com/nodejs/node/issues/50753 Reviewed-By: Joyee Cheung ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/51097 Fixes: https://github.com/nodejs/node/issues/50753 Reviewed-By: Joyee Cheung -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - module,win: fix long path resolve ℹ This PR was created on Fri, 08 Dec 2023 13:28:00 GMT ✔ Approvals: 1 ✔ - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/51097#pullrequestreview-1891732903 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-04-01T17:51:22Z: https://ci.nodejs.org/job/node-test-pull-request/58036/ - Querying data for job/node-test-pull-request/58036/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/8596048782 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@joyeecheung do you see why this couldn't land from this log? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 45f0dd0 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It looks like the Node.js v22 PR contains the fix "module,win: fix long path resolve (by @StefanStojanovic) #51097": So maybe Node.js has support for long paths on Windows now! (make sure that you have |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Long node_modules paths cannot be found on Windows whenLongPathsEnabled enabled
There was an error while loading. Please reload this page.