| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
It gets somewhat lost in the noise but this is a bug fix: the fs.rmdirSync() logic didn't work because a/ contains more than just a/b. It didn't result in actual failures because the test runner cleans it up afterwards.
Sorry, something went wrong.
There was a problem hiding this comment.
Think this is worth documenting. With this addition I imagine that if there are other native fs functions people want they'll request something similar (though I'm not sure what those would be).
Sorry, something went wrong.
|
I'm happy with this approach. |
Sorry, something went wrong.
There was a problem hiding this comment.
Lgtm but needs docs
Sorry, something went wrong.
|
I wrought documentation, PTAL. Rebase + new CI: https://ci.nodejs.org/job/node-test-pull-request/11282/ |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with docs. Thanks @bnoordhuis
Sorry, something went wrong.
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 <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
Landed in 74023c0. The one CI failure was a known problematic test on AIX. |
Sorry, something went wrong.
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 <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Mea culpa, somehow I managed to drop the documentation commit while merging the pull request. This should have been included in commit 74023c0 ("fs: expose realpath(3) bindings") from this month. PR-URL: nodejs#17059 Refs: nodejs#15776 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
|
Back-porters, this should land together with the documentation from #17059. |
Sorry, something went wrong.
|
Hiya, this completely breaks Jest with the following trace: ../src/node_file.cc:835:void node::RealPath(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `(args.Length()) >= (2)' failed. 1: node::Abort() [node] 2: node::Assert(char const* const (*) [4]) [node] 3: 0x5595756fed3d [node] 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node] 5: 0x5595750292df [node] 6: 0x55957502982f [node] 7: 0x2e88c60842fd Should I create a new issue? Simple repro can be seen in issue jestjs/jest#5030, but also on jest's own code base. |
Sorry, something went wrong.
|
Completely minimal reproduction is: node -p "process.binding('fs').realpath(process.cwd())". Works on 9.1, aborts on 9.2. Adding 'utf8' as second parameter makes it work |
Sorry, something went wrong.
|
Is Jest using process.binding() directly? If so, it really shouldn't be. |
Sorry, something went wrong.
|
It is indeed. PR on the way. EDIT: jestjs/jest#5031 |
Sorry, something went wrong.
|
Looks like jest also has graceful-fs in it's dependency tree. graceful-fs is known to be problematic due to it's insistence on using process.binding() |
Sorry, something went wrong.
|
It only happens on the beta releases of jest, not on the version marked latest. Its usage was added recently to fix case sensitivity on Windows (jestjs/jest#4730). PR with "fix": jestjs/jest#5031. Would be ideal to use the function added in this PR, but we still have to support older versions of node. |
Sorry, something went wrong.
Mea culpa, somehow I managed to drop the documentation commit while merging the pull request. This should have been included in commit 74023c0 ("fs: expose realpath(3) bindings") from this month. PR-URL: #17059 Refs: #15776 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
|
Release team were -1 on landing on 6.x, but +1 on reconsidering for the next 8.x minor. |
Sorry, something went wrong.
|
Choosing not to land this on 8.x right now as it had earlier broken jest and could cause similar unexpected breakages. Someone should feel open to change labels / open a PR if they feel otherwise |
Sorry, something went wrong.
|
quick ping to ensure no one wants to see this backported |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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
Refs: #7899
CI: https://ci.nodejs.org/job/node-test-pull-request/10411/
If we don't go down this, ah, path, we should just remove the method from src/node_file.cc.
edit: forgot to mention: no documentation just yet because that would be wasted effort if everyone hates this.