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

gyp: sync code base with nodejs repo #1975

Merged
merged 4 commits into from
Feb 19, 2020
Merged

gyp: sync code base with nodejs repo #1975

merged 4 commits into from
Feb 19, 2020

Conversation

targos
Copy link
Member

@targos targos commented Nov 20, 2019

This syncs the gyp code base so that it is identical to the one in nodejs/node.

This was done by removing the code in nodejs/node-gyp, copying from nodejs/node and then manually reviewing and adapting the diff.

@targos
Copy link
Member Author

targos commented Nov 20, 2019

PR in nodejs/node: nodejs/node#30563

@@ -1951,13 +1951,11 @@ def _InstallableTargetInstallPath(self):
"""Returns the location of the final output for an installable target."""
# Xcode puts shared_library results into PRODUCT_DIR, and some gyp files
# rely on this. Emulate this behavior for mac.

# XXX(TooTallNate): disabling this code since we don't want this behavior...
Copy link
Member

Choose a reason for hiding this comment

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

note the TODO here specifically for node-gyp, I wonder how much this matters still? is it just a case of disallowing end-user from specifying shared_library in their binding.gyp? 🤷‍♂

Copy link
Member Author

Choose a reason for hiding this comment

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

Change was done in a2ed0df

If we need to keep it here, can we also apply it to node? I don't know the implications...

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know what to do with this. The change is in node-gyp since 2012, the commit message doesn't explain why it was done and I can't find the pull request that introduced it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try to remove this code in nodejs/node and see if CI is happy. Maybe the gyp files that rely on this are not ours.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, removing these lines breaks the Node.js build: https://ci.nodejs.org/job/node-test-commit-linux-containered/16453/nodes=ubuntu1804_sharedlibs_shared_x64/console
So we're back to the original question: how does it matter to node-gyp?
@TooTallNate sorry to bother you, but since you committed the change, maybe you remember why it was needed?

Copy link
Member

Choose a reason for hiding this comment

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

Will this be a blocker ? or we can merge this for now and left as it is ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is not a blocker anymore.

@rvagg
Copy link
Member

rvagg commented Nov 21, 2019

Very brave of you @targos.
I feel far from qualified to review this properly. Hopefully @cclauss @joaocgreis @bnoordhuis and others could pitch in?
It seems to me that there are a lot of formatting changes that can be ignored. There's a ton of Windows changes which I believe were applied to nodejs/node but are not necessary here because we make up for it with JS, but wouldn't hurt to be here. The rest is the grey stuff that it would be good to have some knowledgeable eyes over.
We could bump to v7 to release this since there's a lot of changes and I suspect we wouldn't be able to guarantee this doesn't break existing use.

@targos
Copy link
Member Author

targos commented Nov 21, 2019

Most of the changes here come from upstream gyp updates that were applied to nodejs/node two to three years ago.

Copy link
Contributor

@ryzokuken ryzokuken left a comment

Choose a reason for hiding this comment

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

RSLGTM, some comments in the complementary PR. Will try to review this more thoroughly later.

@targos
Copy link
Member Author

targos commented Dec 1, 2019

/cc @nodejs/node-gyp

@joaocgreis
Copy link
Member

Copy link
Member

@joaocgreis joaocgreis left a comment

Choose a reason for hiding this comment

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

This is failing in all Windows 2016 runners. This needs to be fixed before this can land.

@targos
Copy link
Member Author

targos commented Dec 2, 2019

I'll need help, because it doesn't seem like the actual error message from MSBuild.exe was printed to the console.

@rvagg
Copy link
Member

rvagg commented Jan 6, 2020

how about we bump semver-major with this and go with a node-gyp v7. node-gyp 5 is still being used by npm so 6 is currently for people using it manually, a bump to 7 gives us some breakage room and lets people opt-in to an upgrade, then npm could choose to jump to v7 at some point if it wants instead of v6.

@targos
Copy link
Member Author

targos commented Jan 30, 2020

Re-synced. Thanks @joaocgreis for the fix!

GitHub Actions passed.
Here's a CI run on Jenkins: https://ci.nodejs.org/view/All/job/nodegyp-test-pull-request/175/

@targos
Copy link
Member Author

targos commented Jan 30, 2020

All green!

@nodejs/node-gyp PTAL and merge if you like :)

From my point of view, this can be semver-major. I only care about unifying the code between this repo and node core, so it doesn't matter in which release this goes first.

Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

rubber-stamp, too hard for me to review in detail but if it passes then I guess the best we can do is plough ahead and find out by pushing it into a v7.

@gengjiawen
Copy link
Member

@rvagg let's merge this to master ?

@joaocgreis joaocgreis dismissed their stale review February 18, 2020 20:42

Outdated review, this looks fixed now.

@joaocgreis
Copy link
Member

Sorry for not dismissing my review earlier, I missed it when I investigated the failure.

CI: https://ci.nodejs.org/view/All/job/nodegyp-test-pull-request/176/ ✔️ (this does not rebase, would be good to run CI on the final rebased version before landing)

@gengjiawen
Copy link
Member

Sorry for not dismissing my review earlier, I missed it when I investigated the failure.

CI: https://ci.nodejs.org/view/All/job/nodegyp-test-pull-request/176/ ✔️ (this does not rebase, would be good to run CI on the final rebased version before landing)

Looks like the CI passed. If we have no future questions, I want to land this.

@gengjiawen gengjiawen merged commit 972780b into master Feb 19, 2020
@gengjiawen
Copy link
Member

@rvagg I have launched the PR. If you have any problems, feel free to revert this.

@targos I think we continue to work on nodejs/node#30563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants