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

zlib: move process.binding('zlib') to internalBinding #23307

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Oct 7, 2018

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

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib subsystem. labels Oct 7, 2018
@addaleax
Copy link
Member Author

addaleax commented Oct 9, 2018

Copy link
Contributor

@thefourtheye thefourtheye left a comment

Choose a reason for hiding this comment

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

Isn't this a major change?

@cjihrig cjihrig added the semver-major PRs that contain breaking changes and should be released in the next major version. label Oct 9, 2018
@cjihrig
Copy link
Contributor

cjihrig commented Oct 9, 2018

Yes, it's part of the larger #22160. I've added the label.

@addaleax
Copy link
Member Author

addaleax commented Oct 9, 2018

@thefourtheye @cjihrig Can you explain why this is semver-major? We specifically have the whitelist in internal/bootstrap/node.js to avoid breakage, any this doesn’t introduce any new runtime or documentation deprecation.

@jasnell
Copy link
Member

jasnell commented Oct 9, 2018

We have been treating these all as semver-major even with the whitelist, just to be extra careful.

@addaleax
Copy link
Member Author

addaleax commented Oct 10, 2018

I get that we can decide to be careful if we can imagine a chance of breakage – but process.binding('zlib') is the only thing being changed here, and that keeps working and returns the same object.

I’m sorry, but labelling these PRs semver-major seems to have no effect to me except creating merge future conflicts.

If there are no firm objections, I’ll remove the label here and for the other PRs that added whitelisted modules. If you do have an objection, I’d really appreciate a reason or even just example code using process.binding() that would break.

@jasnell
Copy link
Member

jasnell commented Oct 10, 2018

The process.binding method had been replaced entirely to enable the whitelist. It should be ok but we can't guarantee it. I'd prefer semver-major.

@danbev
Copy link
Contributor

danbev commented Oct 10, 2018

Travis CI is failing on a missing subsystem but this does not seem correct as the commit does have a subsystem specified.

@addaleax
Copy link
Member Author

@Trott ^^^ ?

@Trott
Copy link
Member

Trott commented Oct 10, 2018

@Trott ^^^ ?

Travis does this:

$ git clone --depth=50 https://github.com/nodejs/node.git nodejs/node
$ cd nodejs/node
$ git fetch origin +refs/pull/23307/merge:
$ git checkout -qf FETCH_HEAD

For some reason, in this case but not in other pull requests as far as I have seen, that results in a merge commit only.

$ git log -2
commit 32b0d865929eff831bd6c00f7784ae74e06ebbca
Merge: eddfa2c52e 7765c16c72
Author: Anna Henningsen <[email protected]>
Date:   Wed Oct 10 00:49:29 2018 +0000

    Merge 7765c16c72eeb9572b347357c5eb482030d69dd2 into eddfa2c52ee91e657c1a3e42815e6dff960a7fe3

commit eddfa2c52ee91e657c1a3e42815e6dff960a7fe3
Author: Rich Trott <[email protected]>
Date:   Mon Sep 24 21:54:13 2018 -0700

    doc: simplify governance info in README intro
    
    Remove unnecessary wordiness in the governance sentence. It appears very
    early in the README so it should be short and clear. This also removes
    an instance of passive voice.
    
    PR-URL: https://github.com/nodejs/node/pull/23320
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Vse Mozhet Byt <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
$

The merge commit is skipped for commit linting, and since there are no other commits in the PR, this ends up linting the very first commit ever added to Node.js which indeed does not have a subsystem.

$ git log 9d7895c567
commit 9d7895c567e8f38abfff35da1b6d6d6a0a06f9aa
Author: Ryan <[email protected]>
Date:   Mon Feb 16 01:02:00 2009 +0100

    add dependencies
$

If someone more knowledgable about git can explain why this PR results in a merge commit when others apparently do not, I'd be grateful. I'm guessing that the PR branch is missing some commits on master that edit the same files as this PR, so there's a merge that has to happen? But that's a guess. If so, I imagine a rebase would fix the issue for this PR. Will have to think about how to fix it more globally, though...

@Trott
Copy link
Member

Trott commented Oct 10, 2018

I think I can fix it in a robust way using TRAVIS_COMMIT environment variable or something similar. PR coming soon...

Trott added a commit to Trott/io.js that referenced this pull request Oct 10, 2018
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: nodejs#23307 (comment)
@Trott
Copy link
Member

Trott commented Oct 10, 2018

#23397 should fix that Travis issue. Feel free to head over to approve fast-tracking.

Trott added a commit to Trott/io.js that referenced this pull request Oct 10, 2018
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: nodejs#23307 (comment)

PR-URL: nodejs#23397
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
@Trott
Copy link
Member

Trott commented Oct 10, 2018

Travis issue (hopefully) fixed in a1edecc. A rebase here to get those changes should show a clean Travis lint run (although I suspect a rebase would have fixed it anyway).

targos pushed a commit that referenced this pull request Oct 10, 2018
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: #23307 (comment)

PR-URL: #23397
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
@addaleax
Copy link
Member Author

Landed in 09c42f4

@addaleax addaleax closed this Oct 12, 2018
@addaleax addaleax deleted the zlib-internalbinding branch October 12, 2018 21:58
addaleax added a commit that referenced this pull request Oct 12, 2018
PR-URL: #23307
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
jasnell pushed a commit that referenced this pull request Oct 17, 2018
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: #23307 (comment)

PR-URL: #23397
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
jasnell pushed a commit that referenced this pull request Oct 17, 2018
PR-URL: #23307
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 26, 2018
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: #23307 (comment)

PR-URL: #23397
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: #23307 (comment)

PR-URL: #23397
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
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++. semver-major PRs that contain breaking changes and should be released in the next major version. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.