Skip to content
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

src: move node_process to modern THROW_ERR* #35472

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Oct 2, 2020

Semver-minor because it adds a code. Not semver-major because the error messages do not change. There is one changed detail tho: previously a couple of these functions would throw if too many arguments were passed in. I've relaxed that here given that it's not a check we consistently apply throughout.

Signed-off-by: James M Snell jasnell@gmail.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell jasnell added semver-minor PRs that contain new features and should be released in the next minor version. lib / src Issues and PRs related to general changes in the lib or src directory. errors Issues and PRs related to JavaScript errors originated in Node.js core. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 2, 2020
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 2, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 2, 2020
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Oct 3, 2020

Semver-minor because it adds a code. Not semver-major because the error messages do not change.

Not going to fight it or anything, but isn't this backwards? Isn't the idea that message changes are semver-patch and changing (or adding) a code to an error is semver-major?

@Trott
Copy link
Member

Trott commented Oct 3, 2020

There is one changed detail tho: previously a couple of these functions would throw if too many arguments were passed in. I've relaxed that here given that it's not a check we consistently apply throughout.

Is there a use case for this and/or a record of it causing problems for folks? Or is the motive more about internal consistency?

@Trott
Copy link
Member

Trott commented Oct 3, 2020

Semver-minor because it adds a code. Not semver-major because the error messages do not change.

Not going to fight it or anything, but isn't this backwards? Isn't the idea that message changes are semver-patch and changing (or adding) a code to an error is semver-major?

Oh, wait, I see... semver-minor and not semver-patch, on the grounds that adding a code is minor but changing a code would be major. Sure. I would have thought major out of caution would be the default, but I also think the approach here makes sense so... ¯\(ツ)

@nodejs-github-bot
Copy link
Collaborator

@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 5, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 5, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2020

Commit Queue failed
- Loading data for nodejs/node/pull/35472
✔  Done loading data for nodejs/node/pull/35472
----------------------------------- PR info ------------------------------------
Title      src: move node_process to modern THROW_ERR* (#35472)
Author     James M Snell  (@jasnell)
Branch     jasnell:node_process_errors -> nodejs:master
Labels     C++, errors, lib / src, semver-minor
Commits    1
 - src: move node_process to modern THROW_ERR*
Committers 1
 - James M Snell 
PR-URL: https://github.com/nodejs/node/pull/35472
Reviewed-By: Joyee Cheung 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/35472
Reviewed-By: Joyee Cheung 
--------------------------------------------------------------------------------
   ✔  Last GitHub Actions successful
   ℹ  Last Full PR CI on 2020-10-04T00:50:42Z: https://ci.nodejs.org/job/node-test-pull-request/33359/
- Querying data for job/node-test-pull-request/33359/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
   ℹ  This PR was created on Fri, 02 Oct 2020 21:52:07 GMT
   ✔  Approvals: 1
   ✔  - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/35472#pullrequestreview-501630565
   ✖  This PR needs to wait 100 more hours to land (or 0 hours if there is one more approval)
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu

@github-actions github-actions bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Oct 5, 2020
@jasnell jasnell removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Oct 5, 2020
jasnell added a commit that referenced this pull request Oct 10, 2020
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #35472
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented Oct 10, 2020

Landed in b28ba4b

@jasnell jasnell closed this Oct 10, 2020
MylesBorins pushed a commit that referenced this pull request Oct 14, 2020
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #35472
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Oct 14, 2020
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #35472
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins added a commit that referenced this pull request Nov 3, 2020
Notable changes:

crypto:
  * update certdata to NSS 3.56 (Shelley Vohr) #35546
deps:
  * update llhttp to 2.1.3 (Fedor Indutny) #35435
  * (SEMVER-MINOR) upgrade to libuv 1.40.0 (Colin Ihrig) #35333
doc:
  * add aduh95 to collaborators (Antoine du Hamel) #35542
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) added scheduling option to http agent (delvedor) #33278
module:
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
n-api:
  * (SEMVER-MINOR) add more property defaults (Gerhard Stoebich) #35214
src:
  * (SEMVER-MINOR) move node_contextify to modern THROW_ERR_* (James M Snell) #35470
  * (SEMVER-MINOR) move node_process to modern THROW_ERR* (James M Snell) #35472
  * (SEMVER-MINOR) expose v8::Isolate setup callbacks (Shelley Vohr) #35512

PR-URL: TODO
@MylesBorins MylesBorins mentioned this pull request Nov 3, 2020
MylesBorins added a commit that referenced this pull request Nov 4, 2020
Notable changes:

crypto:
  * update certdata to NSS 3.56 (Shelley Vohr) #35546
deps:
  * update llhttp to 2.1.3 (Fedor Indutny) #35435
  * (SEMVER-MINOR) upgrade to libuv 1.40.0 (Colin Ihrig) #35333
doc:
  * add aduh95 to collaborators (Antoine du Hamel) #35542
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) added scheduling option to http agent (delvedor) #33278
module:
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
n-api:
  * (SEMVER-MINOR) add more property defaults (Gerhard Stoebich) #35214
src:
  * (SEMVER-MINOR) move node_contextify to modern THROW_ERR_* (James M Snell) #35470
  * (SEMVER-MINOR) move node_process to modern THROW_ERR* (James M Snell) #35472
  * (SEMVER-MINOR) expose v8::Isolate setup callbacks (Shelley Vohr) #35512

PR-URL: TODO
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #35472
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins added a commit that referenced this pull request Nov 16, 2020
Notable changes:

crypto:
  * update certdata to NSS 3.56 (Shelley Vohr) #35546
deps:
  * update llhttp to 2.1.3 (Fedor Indutny) #35435
  * (SEMVER-MINOR) upgrade to libuv 1.40.0 (Colin Ihrig) #35333
doc:
  * add aduh95 to collaborators (Antoine du Hamel) #35542
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) added scheduling option to http agent (delvedor) #33278
module:
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
n-api:
  * (SEMVER-MINOR) add more property defaults (Gerhard Stoebich) #35214
src:
  * (SEMVER-MINOR) move node_contextify to modern THROW_ERR_* (James M Snell) #35470
  * (SEMVER-MINOR) move node_process to modern THROW_ERR* (James M Snell) #35472
  * (SEMVER-MINOR) expose v8::Isolate setup callbacks (Shelley Vohr) #35512

PR-URL: #35950
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. errors Issues and PRs related to JavaScript errors originated in Node.js core. lib / src Issues and PRs related to general changes in the lib or src directory. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants