Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
lib: runtime deprecate process.binding()#48568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
nodejs-github-bot commented Jun 26, 2023
Review requested:
|
cc808bc to 3d721f7Compare| process.emitWarning( | ||
| `Access to process.binding('${module}') is deprecated.`, | ||
| 'DeprecationWarning', | ||
| 'DEP0111'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this do the opposite of runtime deprecating?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was emitting a warning whenever a runtime deprecated module is called with process.binding. Example, process.binding('async_wrap'). Now, all the modules are deprecated, so I removed them in favor of:
process.binding=deprecate(process.binding,'process.binding() is deprecated. '+'Please use public APIs instead.','DEP0111');Otherwise, users were going to see two warning deprecations for the same operation.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: RafaelGSS <[email protected]>
3d721f7 to a2b9fecComparejoyeecheung commented Jun 28, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I think a less disruptive approach to deprecate
Simply deprecating |
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
targos commented Jun 30, 2023
To assess ecosystem impact, we could change it from warning to throwing an error and run CITGM. |
RafaelGSS commented Jun 30, 2023
So practically speaking, your suggestion is to keep doing what @jasnell was doing on #37576 and subsequent PRs? My initial thought was to leverage that the next major release is a non-lts version and it's likely the best way to assess the real impact of that feature. If that proves not worth it, we can revert to Node.js 22 -- I know that that's far from ideal and can lead us to some non-great feedback from the community, but I feel that's the only way to really see the impact and plan what to do next.
Agree. Regardless if we're going to pursue this work or not, it's good to have a big picture. I'll run it right after fixing the test issues. |
RafaelGSS commented Jul 4, 2023
CITGM: https://ci.nodejs.org/job/citgm-smoker/3179/ (rebased on main) |
jasnell commented Sep 14, 2023
FWIW, I'm fine with the more disruptive approach on this. It's been long enough. |
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
aduh95 commented Sep 29, 2023
@RafaelGSS can you please rebase? |
RafaelGSS commented Nov 15, 2023
Closing in favor of #50687 |
Following up @jasnell work on runtime deprecation of some modules. This pr deprecates the process.binding entirely, targetting Node.js 21 (non-LTS version).
I'm opening this PR just to see how feasible/impactful is this approach. I wonder if #37485 (review) is still an issue.
cc: @nodejs/tsc