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

bootstrapper: move internalBinding to NativeModule wrapper #23025

Closed
wants to merge 1 commit into from

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Sep 22, 2018

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

@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Sep 22, 2018
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Thanks for moving this back!

@devsnek
Copy link
Member Author

devsnek commented Sep 22, 2018

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

thank you! :-)

you just crossed item #3 off my standing todo list 👍

@@ -294,7 +294,7 @@
const requireFn = this.id.startsWith('internal/deps/') ?
NativeModule.requireForDeps :
NativeModule.require;
fn(this.exports, requireFn, this, process);
fn(this.exports, requireFn, this, process, internalBinding);
Copy link
Member

Choose a reason for hiding this comment

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

IIRC, it should be safe to remove internalBinding from loaderExports by now?

Copy link
Member Author

Choose a reason for hiding this comment

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

bootstrap/node.js uses it, so we can't

@refack
Copy link
Contributor

refack commented Sep 23, 2018

I would like to ask to have some context. There is no description in the OP or the commit message.
Is there a reference to discussion? Is this reverting something?

@devsnek
Copy link
Member Author

devsnek commented Sep 23, 2018

@refack i suppose this sorta reverts a part of 2a9eb31.

there isn't really any larger discussion though. its just annoying to have to require internal/binding/loader to grab our internal bindings. we use them often enough to put them in the wrapper.

@refack
Copy link
Contributor

refack commented Sep 23, 2018

sorta reverts a part of 2a9eb31.
we use them often enough to put them in the wrapper.

@devsnek Thank you. That's sort of what I was looking for. Could you put it in the commit message for future generations.

@devsnek
Copy link
Member Author

devsnek commented Sep 23, 2018

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

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

Thank you!

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 23, 2018
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

❤️

@devsnek
Copy link
Member Author

devsnek commented Sep 25, 2018

@danbev
Copy link
Contributor

danbev commented Sep 26, 2018

Re-run of failing node-test-commit-arm-fanned and node-test-commit-linux.

@danbev
Copy link
Contributor

danbev commented Oct 4, 2018

@devsnek Would you be able to rebase this? Sorry about the delay, CI has not been very happy the last week but I'll try to re-run it and land this as soon as possible.

internalBinding is used so often that it should just automatically be
available for usage in internals.

Refs: nodejs@2a9eb31
@danbev
Copy link
Contributor

danbev commented Oct 4, 2018

@danbev
Copy link
Contributor

danbev commented Oct 4, 2018

Landed in e7f710c.

@danbev danbev closed this Oct 4, 2018
danbev pushed a commit that referenced this pull request Oct 4, 2018
internalBinding is used so often that it should just automatically be
available for usage in internals.

PR-URL: #23025
Refs: 2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@addaleax
Copy link
Member

@targos @devsnek dont-land-on-v10.x? This should be backported, imo, as anything else is going to be a major backporting pain for LTS… especially since it essentially brings our source code back to a state in which it has been before

@devsnek
Copy link
Member Author

devsnek commented Oct 14, 2018

This should be fine to include in 10.x 🤷

@targos
Copy link
Member

targos commented Oct 14, 2018

Feel free to backport. I felt like it would be less work to fix a few trivial conflicts from time to time than backporting this big change.

@addaleax
Copy link
Member

It doesn’t cherry-pick cleanly (suprise!). @devsnek Do you want to backport or should I?

@devsnek
Copy link
Member Author

devsnek commented Oct 14, 2018

If you're willing that would be great, I don't have access to a checkout of node until tomorrow anyway.

addaleax pushed a commit to addaleax/node that referenced this pull request Oct 14, 2018
internalBinding is used so often that it should just automatically be
available for usage in internals.

PR-URL: nodejs#23025
Refs: nodejs@2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
jasnell pushed a commit that referenced this pull request Oct 17, 2018
internalBinding is used so often that it should just automatically be
available for usage in internals.

PR-URL: #23025
Refs: 2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
addaleax pushed a commit that referenced this pull request Oct 20, 2018
internalBinding is used so often that it should just automatically be
available for usage in internals.

PR-URL: #23025
Refs: 2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

Backport-PR-URL: #23661
Backport-Reviewed-By: Gus Caplan <me@gus.host>
Backport-Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Backport-Reviewed-By: Michaël Zasso <targos@protonmail.com>
Backport-Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Backport-Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Oct 30, 2018
internalBinding is used so often that it should just automatically be
available for usage in internals.

PR-URL: #23025
Refs: 2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

Backport-PR-URL: #23661
Backport-Reviewed-By: Gus Caplan <me@gus.host>
Backport-Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Backport-Reviewed-By: Michaël Zasso <targos@protonmail.com>
Backport-Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Backport-Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@codebytere codebytere mentioned this pull request Nov 27, 2018
rvagg pushed a commit that referenced this pull request Nov 28, 2018
internalBinding is used so often that it should just automatically be
available for usage in internals.

PR-URL: #23025
Refs: 2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

Backport-PR-URL: #23661
Backport-Reviewed-By: Gus Caplan <me@gus.host>
Backport-Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Backport-Reviewed-By: Michaël Zasso <targos@protonmail.com>
Backport-Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Backport-Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Nov 29, 2018
internalBinding is used so often that it should just automatically be
available for usage in internals.

PR-URL: #23025
Refs: 2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

Backport-PR-URL: #23661
Backport-Reviewed-By: Gus Caplan <me@gus.host>
Backport-Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Backport-Reviewed-By: Michaël Zasso <targos@protonmail.com>
Backport-Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Backport-Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@codebytere codebytere mentioned this pull request Nov 29, 2018
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 pending requests for changes, and a CI started. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.