-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
lib: deprecate _http_* #58535
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
base: main
Are you sure you want to change the base?
lib: deprecate _http_* #58535
Conversation
Review requested:
|
11b6878
to
329d0a0
Compare
674ca6f
to
0ec4ccc
Compare
0ec4ccc
to
bd305a8
Compare
@@ -1,6 +1,7 @@ | |||
'use strict'; | |||
|
|||
const common = require('../common.js'); | |||
// TODO: benchmark has access to internal modules? | |||
const _checkIsHttpToken = require('_http_common')._checkIsHttpToken; |
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.
These aren't really considered internal modules, fwiw
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.
But that property is not under the http module, so when _http_common stops being a module and becomes internal-only, the benchmark won’t work. That’s why I was asking if it's possible to use internals in the benchmarks.
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.
yes I imagine that the require was supposed to be updated to internal/http/common
?
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.
My concern would be whether or not anyone in userland could be using this, as unlikely as that may be. Should we export this through the regular node:http
API to provide an alternative path to them?
@nodejs/http @mcollina |
This one might need a Documentation-only deprecation to start. It's likely going to be too disruptive to go straight to a Runtime deprecation. https://github.com/search?type=code&q=%22require%28%27_http%22 |
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.
Yay! thanks for doing this! 🫶
(with this all pesky _modules will be runtime deprecated! 💪)
@@ -1,3 +1,4 @@ | |||
// Flags: --expose-internals --no-warnings |
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.
why the addition of --no-warning
? here and in the other tests
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.
I only saw it in other tests, I thought it was necessary.
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.
I checked this and I must say that I find it very weird.... I went and checked existing--no-warning
I cannot really understand why they are there, since the test script suppresses outputs anyways, I totally cannot see any difference when I try to remove them... 🤷
@@ -1,6 +1,7 @@ | |||
'use strict'; | |||
|
|||
const common = require('../common.js'); | |||
// TODO: benchmark has access to internal modules? | |||
const _checkIsHttpToken = require('_http_common')._checkIsHttpToken; |
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.
yes I imagine that the require was supposed to be updated to internal/http/common
?
@@ -1,6 +1,7 @@ | |||
'use strict'; | |||
|
|||
const common = require('../common.js'); | |||
// TODO: benchmark has access to internal modules? |
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.
should the require be updated to internal/http/common
? 🙂
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.
yes, but I’m not really sure if the benchmark has access to the internals or not :)
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.
ah no.... the benchmarks, as far as I understand it, should be runnable with any build of node, so yeah that's a good point, I don't think it's correct to have a benchmark access internal modules
Most of them seem to be just forks of Node.js, rather than actually using these undocumented modules. |
Co-authored-by: Dario Piotrowicz <[email protected]>
I wish that were the case. While there are a good number of forks in those search results, it's plain to see that there are a non-trivial number of other projects requiring "_http_common" and friends. We need to assess just how disruptive this will be... but don't get me wrong, I am in favor of deprecated these but it might need to be a slower path. I'd like @nodejs/http folks to weigh in. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58535 +/- ##
==========================================
+ Coverage 90.23% 90.25% +0.01%
==========================================
Files 635 641 +6
Lines 187580 187832 +252
Branches 36860 36862 +2
==========================================
+ Hits 169265 169520 +255
+ Misses 11101 11095 -6
- Partials 7214 7217 +3
🚀 New features to boost your workflow:
|
@@ -1,6 +1,7 @@ | |||
'use strict'; | |||
|
|||
const common = require('../common.js'); | |||
// TODO: benchmark has access to internal modules? |
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.
ah no.... the benchmarks, as far as I understand it, should be runnable with any build of node, so yeah that's a good point, I don't think it's correct to have a benchmark access internal modules
_checkIsHttpToken, | ||
chunkExpression, | ||
continueExpression, | ||
CRLF, // TODO: Deprecate this. |
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.
CRLF, // TODO: Deprecate this. | |
CRLF, |
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.
no need to have a deprecate todo inside a deprecated module right? (and I don't think this is re-exported by the public http module, right?)
@@ -1,3 +1,4 @@ | |||
// Flags: --expose-internals --no-warnings |
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.
I checked this and I must say that I find it very weird.... I went and checked existing--no-warning
I cannot really understand why they are there, since the test script suppresses outputs anyways, I totally cannot see any difference when I try to remove them... 🤷
@nodejs/http what are your recommendations? |
close #58534