Uh oh!
There was an error while loading. Please reload this page.
lib: end-of-life the deprecated require('sys') - #26292
Conversation
nodejs-github-bot
commented
Feb 24, 2019
@sam-github sadly an error occured when I tried to trigger a build :( |
| Type: Runtime | ||
| Type: End-of-Life | ||
| The `sys` module is deprecated. Please use the [`util`][] module instead. |
There was a problem hiding this comment.
Maybe:
| The `sys` module is deprecated. Please use the [`util`][] module instead. | |
| The `sys` module was removed. Please use the [`util`][] module instead. |
There was a problem hiding this comment.
(Not sure where the leading space emerges from)
| 'no-proto': 'error', | ||
| 'no-redeclare': 'error', | ||
| 'no-restricted-modules': ['error', 'sys'], | ||
| 'no-restricted-modules': ['error'], |
There was a problem hiding this comment.
| 'no-restricted-modules': ['error'], | |
| 'no-restricted-modules': 'error', |
There was a problem hiding this comment.
This line should be deleted entirely. If you don't specify a second argument, the rule does nothing.
| <!-- YAML | ||
| changes: | ||
| - version: REPLACEME | ||
| pr-url: XXX |
There was a problem hiding this comment.
| pr-url: XXX | |
| pr-url: https://github.com/nodejs/node/pull/26292 |
Fishrock123
commented
Feb 24, 2019
i know there are still modules that use this 😐 |
Trott
commented
Feb 25, 2019
I'm surprised |
To be clear: I think there is a cost of keeping |
Trott
commented
Feb 25, 2019
@Fishrock123 I'm surprised at the notion that the cost of confusion to users is significant in this instance. I have literally never heard of anyone being confused about |
Trott
commented
Feb 25, 2019
Might not be a bad idea for someone to do something like https://github.com/evanlucas/find-sys all over again (maybe using gzemnid?). |
bnoordhuis
left a comment
There was a problem hiding this comment.
We decided years ago to never give up the 'sys' namespace for security reasons but this PR appears to be doing just that. require('sys') (or any other built-in module) should never load third-party code.
jasnell
left a comment
There was a problem hiding this comment.
I agree with @bnoordhuis ... we cannot remove the module name completely.
We could however, upgrade from a deprecation warning to an actual thrown Error.
cjihrig
commented
Feb 25, 2019
I agree that we should not give up the name |
sam-github
commented
Feb 25, 2019
I didn't think this would be so controversial! My reading of #2405 was that it was likely to be deleted for 6.x, so 12.x seemed like a pretty safe overshoot. Anybody using The presence of If there is agreement to delete it, I'll fix up the PR, but I'm not going to lose more time on it if there isn't. I'll wait for more comment, or maybe it needs a TSC agenda label?
|
vsemozhetbyt
commented
Feb 25, 2019
No strong opinion. Please, do as you would consider being better. |
bnoordhuis
commented
Feb 26, 2019
Oversight, I'm afraid. We should probably claim it while we still can. :-) |
targos
commented
Feb 26, 2019
We can't. npm doesn't allow package names that start with an underscore. |
sam-github
commented
Feb 27, 2019
I think I'll just leave this alone. |
See: #2405
It looks like this was going to be considered for Node.js 6.x, so now that 12.x is upcoming, maybe we are ready?
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes