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

dgram: change parameter name in set(Multicast)TTL #13747

Closed
wants to merge 2 commits into from

Conversation

tniessen
Copy link
Member

Changed the parameter name in set(Multicast)TTL from "arg" to "ttl" both within code and error messages. The documentation already contains the correct parameter name.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

dgram


For consideration of the @nodejs/ctc due to being semver-major.

Changed the parameter name in set(Multicast)TTL from "arg" to "ttl"
both within code and error messages.
@tniessen tniessen added dgram Issues and PRs related to the dgram subsystem / UDP. errors Issues and PRs related to JavaScript errors originated in Node.js core. semver-major PRs that contain breaking changes and should be released in the next major version. labels Jun 17, 2017
@nodejs-github-bot nodejs-github-bot added the dgram Issues and PRs related to the dgram subsystem / UDP. label Jun 17, 2017
@tniessen tniessen self-assigned this Jun 17, 2017
@tniessen
Copy link
Member Author

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lib/dgram.js Outdated
throw new errors.TypeError('ERR_INVALID_ARG_TYPE',
'arg',
'ttl',
'number');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about adding the actual argument?

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jasnell do changes to the error message in the new error system still count as semver major? The whole point was to make that not be the case anymore, right?

@jasnell
Copy link
Member

jasnell commented Jun 19, 2017

No, once the error has been migrated to using the error code, changes to the message should no longer be considered semver-major. Only changes to the code or error type would be.

@jasnell jasnell removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Jun 19, 2017
tniessen added a commit that referenced this pull request Jun 20, 2017
Changed the parameter name in set(Multicast)TTL from "arg" to "ttl"
both within code and error messages and added the actual type of the
argument to the error message.

PR-URL: #13747
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@tniessen
Copy link
Member Author

Landed in 279fcc4. CI on master: https://ci.nodejs.org/job/node-test-commit/10690/

@tniessen tniessen closed this Jun 20, 2017
@addaleax addaleax mentioned this pull request Jun 21, 2017
addaleax pushed a commit that referenced this pull request Jun 21, 2017
Changed the parameter name in set(Multicast)TTL from "arg" to "ttl"
both within code and error messages and added the actual type of the
argument to the error message.

PR-URL: #13747
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@addaleax addaleax mentioned this pull request Jun 21, 2017
@MylesBorins
Copy link
Contributor

Should this be backported to v6.x?

@MylesBorins
Copy link
Contributor

ping @tniessen

@tniessen
Copy link
Member Author

@MylesBorins Sorry, must have missed the notification. No, this should not be backported to v6.x as it uses the new errors API and an adaption to the old error system would make it semver-major.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dgram Issues and PRs related to the dgram subsystem / UDP. errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants