-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
ERR_TLS_RENEGOTIATE, ERR_HTTP2_SETTINGS_CANCEL are not defined #21440
Comments
@BridgeAR I am looking only at JS side, not docs. At 1d2fd8b, there is no I could be wrong with interpreting |
Oh, I only looked at the first entry before the edits. |
This is the list of errors that seem to be missing documentation:
Those are the three mentioned above (that also miss implementation), plus:
|
|
|
|
|
@BridgeAR #21440 (comment) is specifically about documentation — I saw how those are created and it's ok that they are not present in |
Based on f67aa56, this might also affect v9.x branch. |
Oh, true. They were falsely removed in 1cdb41f. |
This may be a good opportunity to rename |
|
Ok, I made the scanner aware of cpp-side errors, and found that To summarize: Used, but missing implementation:
Used, but missing documentation:
Documented, do not seem to be present anywhere:
|
Full output on v10.5.0:
Test script: https://gist.github.com/ChALkeR/a592f1e79624806b383007d7c5d4a395 |
/cc @jasnell |
PR with my test script: #21470. |
ERR_HTTP2_ERROR and ERR_UNKNOWN_BUILTIN_MODULE error codes documentation seem to have been accidentally removed in commit 1cdb41f (pull request nodejs#15160). This reverts that removal, restoring the documentation for those two error codes. Those error codes are used from lib/ folder. This is a part of the fixes hinted by nodejs#21470, which includes some tests for error codes usage and documentation and enforces a stricter format. PR-URL: nodejs#21484 Refs: nodejs#21470 Refs: nodejs#21440 Refs: nodejs#15160 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
ERR_HTTP2_ERROR and ERR_UNKNOWN_BUILTIN_MODULE error codes documentation seem to have been accidentally removed in commit 1cdb41f (pull request #15160). This reverts that removal, restoring the documentation for those two error codes. Those error codes are used from lib/ folder. This is a part of the fixes hinted by #21470, which includes some tests for error codes usage and documentation and enforces a stricter format. PR-URL: #21484 Refs: #21470 Refs: #21440 Refs: #15160 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
@ChALkeR Interested in picking this Is it fine to use messages below - for the docs- Please let me know if there anything to add more here in docs or error message |
@thatshailesh Technically speaking I don't know the appropriate messages, but here's a quick spell check:
and then
|
@davisjam Thanks for your answer its spelled |
@thatshailesh Actually, I am not sure how to phrase those myself and do not have anything in mind off-hand, — that's one of the reasons why I preferred to delegate it to someone. So I am not the best choice to ask about phrasing. 😃 I would say — open a pull request with some phrasing that seems fine to you, ask for review from involved people, e.g. those who introduced that API and other collaborators, and see how it goes. 😉 |
Ok Sure 👍 Working on it |
This restores a broken and erroneously removed error, which was accidentially renamed to ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK (notice the "INTST" vs "INST") in 921fb84 (PR nodejs#16874) and then had documentation and implementation removed under the old name in 6e1c25c (PR nodejs#18857), as it appeared unused. This error code never worked or was documented under the mistyped name ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK, so renaming it back to ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK is a semver-patch fix. Refs: nodejs#21440 Refs: nodejs#21470 Refs: nodejs#16874 Refs: nodejs#18857
This restores a broken and erroneously removed error, which was accidentially renamed to ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK (notice the "INTST" vs "INST") in 921fb84 (PR #16874) and then had documentation and implementation removed under the old name in 6e1c25c (PR #18857), as it appeared unused. This error code never worked or was documented under the mistyped name ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK, so renaming it back to ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK is a semver-patch fix. Refs: #21440 Refs: #21470 Refs: #16874 Refs: #18857 PR-URL: #21493 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ron Korving <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This restores a broken and erroneously removed error, which was accidentially renamed to ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK (notice the "INTST" vs "INST") in 921fb84 (PR #16874) and then had documentation and implementation removed under the old name in 6e1c25c (PR #18857), as it appeared unused. This error code never worked or was documented under the mistyped name ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK, so renaming it back to ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK is a semver-patch fix. Refs: #21440 Refs: #21470 Refs: #16874 Refs: #18857 PR-URL: #21493 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ron Korving <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Includes implementation of tls, HTTP2 error with documentation. PR-URL: #21564 Refs: #21440 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Includes implementation of tls, HTTP2 error with documentation. PR-URL: #21564 Refs: #21440 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Includes implementation of tls, HTTP2 error with documentation. PR-URL: nodejs#21564 Refs: nodejs#21440 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This adds several sanity checks for error codes. It scans: * all natives (js sources), * doc/api/*.md documentation * src/node_errors.h (errors definition from the C++ side). There is also a whitelist of manually created errors from JS side, currently consisting of ERR_HTTP2_ERROR and ERR_UNKNOWN_BUILTIN_MODULE. Alsom all ERR_NAPI_ codes are whitelisted, as those are created directly on the cpp side, without declaring them first. The performed checks: 1. All errors used from JS should be defined in `internal/errors` and present in its .codes object. Whitelist (mentioned above) applies. 2. All errors instantiated from JS without arguments should support 0-arguments version. 3. All errors mentioned in doc should defined either in JS, C++, or in the whitelist. 4. All errors mentioned anywhere should be documented. 5. Documentation of error codes should be sorted, have no repeats, and include exactly one entry for every error code mentioned in the documentation, formatted as `/\n### (ERR_[A-Z0-9_]+)\n`. 6. All doc entries for error codes should have appropriate anchors. There is also a --report flag, which prints all the current issues and exits without asserting, for manual inspection. Individual fixes for those issues are landed in separate commits. Refs: nodejs#21421 Refs: nodejs#21440 Refs: nodejs#21483 Refs: nodejs#21484 Refs: nodejs#21485 Refs: nodejs#21487 PR-URL: nodejs#21470
Includes implementation of tls, HTTP2 error with documentation. PR-URL: nodejs#21564 Refs: nodejs#21440 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Includes implementation of tls, HTTP2 error with documentation. PR-URL: nodejs#21564 Refs: nodejs#21440 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Includes implementation of tls, HTTP2 error with documentation. Backport-PR-URL: #22850 PR-URL: #21564 Refs: #21440 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
While taking a look at #21435 / #21421, I did a quick and dirty check which errors are being instantiated and
/lib
and checked what happened.ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK
seems to be used in loader, but never defined.node/lib/internal/modules/esm/loader.js
Lines 6 to 8 in b56f65e
node/lib/internal/modules/esm/loader.js
Lines 95 to 96 in b56f65e
ERR_TLS_RENEGOTIATE
seems to be used in tls, but never defined.node/lib/_tls_wrap.js
Lines 47 to 52 in b56f65e
node/lib/_tls_wrap.js
Lines 572 to 574 in b56f65e
ERR_HTTP2_SETTINGS_CANCEL
seems to be used in http2, but never defined.node/lib/internal/http2/core.js
Lines 45 to 62 in b56f65e
node/lib/internal/http2/core.js
Lines 615 to 616 in b56f65e
This probably affects all 10.x versions, but was not backported to earlier branches as is a semver-major.
Blame points at 1d2fd8b / #19137.
/cc @targos
This also probably needs a testcase when fixed, I do not have one atm.
The text was updated successfully, but these errors were encountered: