| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Okay I had to alter the first commit so it will be compatible to the format of the project. I believe that the PR is ready now. |
Sorry, something went wrong.
|
The PR has a bit changed, it now uses a new more generic error, ERR_FEATURE_UNAVAILABLE_ON_PLATFORM, which I believe it's more suitable, as like was demonstrated in the conversation with @addaleax , handles more cases (such as fs.chmod, which I hope in the future will also throw this exception for example in windows). |
Sorry, something went wrong.
There was a problem hiding this comment.
Left some comments. Thanks for the PR!
Sorry, something went wrong.
There was a problem hiding this comment.
Nit: this could be simplified as:
E('ERR_FEATURE_UNAVAILABLE_ON_PLATFORM',
'The feature %s is unavailable on the current platform' +
', which is being used to run Node.js',
TypeError);(It's a semi standard to use that pattern if the error is not too complex)
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with the comments incorporated.
Sorry, something went wrong.
|
I switched from try and catch to built in function & extracted the old logic so it will be more neat. I also reformatted the errors. |
Sorry, something went wrong.
|
Still LGTM |
Sorry, something went wrong.
|
@nodejs/tsc |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
Just a nit... I would just make this more generic like ERR_NOT_IMPLEMENTED or ERR_NOT_AVAILABLE, but it's not critical
Sorry, something went wrong.
There was a problem hiding this comment.
I think there is a great value of knowing this error occurs only on one platform, and that it isn't something that node.js itself doesn't support.
Sorry, something went wrong.
Sorry, something went wrong.
|
ok I can see that some tests fail. Can I contribute to fix it? |
Sorry, something went wrong.
Sorry, something went wrong.
|
@exx8 Sorry, it’s been a while and the old CI results are no longer available. I’ve started a new one, though. Generally, feel free to ping us if you feel like a PR is stalling out somehow. |
Sorry, something went wrong.
It seems that there is a merge conflict now (according to the build: 18:37:55 M lib/internal/errors.js 18:37:55 Falling back to patching base and 3-way merge... 18:37:55 Auto-merging lib/internal/errors.js 18:37:55 CONFLICT (content): Merge conflict in lib/internal/errors.js 18:37:55 error: Failed to merge in the changes. ) or it might be a false alarm (as github says there aren't). |
Sorry, something went wrong.
I think the issue is that one of the 14 commits in this PR has a merge conflict, but not the PR as a whole (i.e. one of the later commits removed the merge conflict again).
It would be helpful if you could rebase this (not git merge) against master, so that we can run CI the usual way. If you’re not feeling comfortable with that, you can also let somebody else do that.
If the contents of the PR stay the same apart from resolving merge conflicts, that should be okay. |
Sorry, something went wrong.
Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl>
Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl>
|
Rebased to eliminate conflict. |
Sorry, something went wrong.
|
@Trott seems like there's a linter issue now? |
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/28610/ |
Sorry, something went wrong.
Sorry, something went wrong.
This pull request makes fs.watch throw exception, whenever it is used in an incompatible platform. For this change following changes were made to api: 1.a new error type has been introduced. 2.fs.watch has been changed accordingly. Users who use recursive on non-windows and osx platforms, will face a new exception. For this reason, it's a breaking change. Fixes: #29901 PR-URL: #29947 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
|
Landed in 67e067e. Thanks for the contribution! 🎉 |
Sorry, something went wrong.
This makes sure this function stays backwards compatible in case it's accessed through the binding directly. Refs: #29947 (comment) Backport-PR-URL: #31431 PR-URL: #30858 Refs: #30767 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This makes sure this function stays backwards compatible in case it's accessed through the binding directly. Refs: #29947 (comment) Backport-PR-URL: #31431 PR-URL: #30858 Refs: #30767 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Use `chokidar` to track file system changes as soon it will throw an
error if the platform does not support `{ recursive: true }`.
Fix also an error where the built file was not being deleted when the
source was removed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix react-native-community#989
Ref: nodejs/node#29947
Use `chokidar` to track file system changes as soon it will throw an
error if the platform does not support `{ recursive: true }`.
Fix also an error where the built file was not being deleted when the
source was removed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix react-native-community#989
Ref: nodejs/node#29947
Use `chokidar` to track file system changes as soon it will throw an
error if the platform does not support `{ recursive: true }`.
Fix also an error where the built file was not being deleted when the
source was removed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix #989
Ref: nodejs/node#29947
| Back | FazBrowse Home | New Git URL |
This pull request makes fs.watch throw exception whenever it is used in an incompatible platform.
For this change following changes were made to api:
Checklist
Solves #29901
This is a breaking change.