Skip to content

dgram: remove unnecessary fd property from Socket - #21684

Closed
oyyd wants to merge 1 commit into
nodejs:masterfrom
oyyd:udp-unnecessary-fd
Closed

dgram: remove unnecessary fd property from Socket#21684
oyyd wants to merge 1 commit into
nodejs:masterfrom
oyyd:udp-unnecessary-fd

Conversation

@oyyd

@oyyd oyyd commented Jul 6, 2018

Copy link
Copy Markdown
Contributor

It seems the property socket.fd is used long before for the compatibility reason but it's not used anymore.

It's also not documented in docs so that it's not a public api/property.

Keep the property also makes the code a bit confusing as socket._handle.fd is the actual property representing fd.

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

@nodejs-github-bot nodejs-github-bot added the dgram Issues and PRs related to the dgram subsystem / UDP. label Jul 6, 2018

@cjihrig cjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In theory this LGTM as a semver-major, but it might need a CITGM run.

@cjihrig cjihrig added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 6, 2018
@oyyd

oyyd commented Jul 8, 2018

Copy link
Copy Markdown
Contributor Author

FYI: nodejs/node-v0.x-archive#8057

Comment thread lib/dgram.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hmm... @nodejs/tsc ... do we know if this could break anyone? It may be minor, but we should likely do a deprecation on this before just removing it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think a simple semver-major removal is fine for this, given that it seems pretty unusable.

@addaleax

Copy link
Copy Markdown
Member

@addaleax addaleax added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. and removed author ready PRs that have at least one approval, no outstanding review comments, and a CI started. labels Jul 18, 2018
@addaleax

Copy link
Copy Markdown
Member

This needs another @nodejs/tsc review

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@cjihrig cjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, I guess I didn't make my LGTM explicit enough before.

@maclover7 maclover7 added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jul 28, 2018
@maclover7

Copy link
Copy Markdown
Contributor

@oyyd Can you rebase this PR please?

It seems the property socket.fd is used long before for the
compatibility reason but it's not used anymore. It's also
not documented in docs so that it's not a public api/property.
Keep the property also make the code a bit confusing as
socket._handle.fd is the actual property representing fd.
@oyyd
oyyd force-pushed the udp-unnecessary-fd branch from b0c3494 to 4fa3fbd Compare August 10, 2018 02:51
@oyyd

oyyd commented Aug 10, 2018

Copy link
Copy Markdown
Contributor Author

@maclover7 PTAL

@maclover7

Copy link
Copy Markdown
Contributor

@maclover7

Copy link
Copy Markdown
Contributor

CI is green besides for worker tests which are having infra issues right now, this should be safe to land

@maclover7

Copy link
Copy Markdown
Contributor

Landed in 3ce6bc3

@maclover7 maclover7 closed this Aug 10, 2018
maclover7 pushed a commit that referenced this pull request Aug 10, 2018
It seems the property socket.fd is used long before for the
compatibility reason but it's not used anymore. It's also
not documented in docs so that it's not a public api/property.
Keep the property also make the code a bit confusing as
socket._handle.fd is the actual property representing fd.

PR-URL: #21684
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. dgram Issues and PRs related to the dgram subsystem / UDP. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants