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 — fs: restore javascript realpath implementation by bzoz · Pull Request #7899 · nodejs/node Conversation
Contributor
Checklist
Affected core subsystem(s)fs Description of changeLibuv This requires #7846 to land, as it reverts changes to First two commits are from #7846, reverting some changes to Third commit reverts b488b19 bringing back JS implementation of Fourth commit updates old implementation. It removes the cache and implements new This cannot land before #7846. In case #7846 does not make it, this can be easily updated.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
A couple of suggestions:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI run: https://ci.nodejs.org/job/node-test-pull-request/3441/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
At the last meeting, the CTC has expressed consensus with the approach in this PR: reverting, leaving the cache out, but keeping the encoding option. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
To me it looks like this reverts too many tests. Could we keep the ones that still pass? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@ChALkeR: Those test are reverted by #7846 on which this PR depends. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@bzoz Your call.There seems to be agreement that the long-term plan is to use a fixed libuv implementation, though, and I think keeping the binding around might be useful for e.g. comparative benchmarks.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
bddaab2 to
0329b6a
Compare
|
In general this LGTM with a green CI. I definitely want to make sure this gets additional eyes on it to review, however. @nodejs/ctc |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@bzoz I've just compiled your PR on Windows and tried the Running |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Why does this PR also revert "fs: validate args of truncate functions in js" and "fs: make callback mandatory to all async functions" ? How are those related to the realpath problems? It makes is a lot harder to review this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Those seem to be handled by #7846, btw. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You don’t need the asyncCompleted checks; wrapping the callback as common.mustCall(function(err, result) { … }) handles that automatically for you.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bzoz Many, many thanks for starting to add regression tests! Overall LGTM, too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI run: https://ci.nodejs.org/job/node-test-pull-request/3453/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM, thanks for doing the work behind this PR! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One Windows build bot failure, running CI again to be safe: https://ci.nodejs.org/job/node-test-commit/4376/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I had one running here https://ci.nodejs.org/job/node-test-commit/4373/, it is green. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh, sorry (but good to hear)! I’d say this is good to go once #7846 is resolved. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bzoz What do you think of squashing all commits but the ones from #7846 to make reviewing changes easier? Currently one has to go through all these commits separately in order to focus on reviewing the changes that are actually related to this PR, which is a bit tedious. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
28efdae to
0c0a6b4
Compare
|
@misterdjules OK, squashed Commits:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What was the result of the discussion about the substed realpath behavior thing? This PR adds a test thus making certain behavior "correct" which might not necessarily be the case. It depends on how substed drives are interpreted, IMHO. On the maze of issues and notes I recall reading that some people where using substed drives to get shorter paths. Was that the case? What breaks if we would give them the long path? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've added a note to the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM, thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI is green. Let's give it another day before landing. @nodejs/ctc @nodejs/collaborators ... please take one final look. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
|
|
||
| fs.realpathSync = function realpathSync(path, options) { | ||
| // Regexp that finds the next partion of a (partial) path |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
typo: partion
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
fixed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The benchmarks included also work for the previous JS implementation of fs.realpath(). In case the new implementation of realpath() needs to be reverted, we want these changes to stick around. PR-URL: #7899 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The benchmarks included also work for the previous JS implementation of fs.realpath(). In case the new implementation of realpath() needs to be reverted, we want these changes to stick around. PR-URL: #7899 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
There was an error while loading. Please reload this page.
|
@bzoz @addaleax one thing I really liked from the behaviour of native |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bpasero I guess you can open a separate issue for this? It sounds like something that would be okay to have. |
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.
Make the `uv_fs_realpath()` binding (which calls the libc `realpath()`
on UNIX and `GetFinalPathNameByHandle()` on Windows) available as the
`fs.realpath.native()` and `fs.realpathSync.native()` functions.
The binding was already available as `process.binding('fs').realpath`
but was not exposed or tested - and partly broken as a result.
Fixes: nodejs#8715
PR-URL: nodejs#15776
Refs: nodejs#7899
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Make the `uv_fs_realpath()` binding (which calls the libc `realpath()`
on UNIX and `GetFinalPathNameByHandle()` on Windows) available as the
`fs.realpath.native()` and `fs.realpathSync.native()` functions.
The binding was already available as `process.binding('fs').realpath`
but was not exposed or tested - and partly broken as a result.
Fixes: #8715
PR-URL: #15776
Refs: #7899
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.