-
Notifications
You must be signed in to change notification settings - Fork 30k
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
build: add node_module_version to config.gypi #7808
Conversation
Work around spec violations in V8 where it checks that `this == NULL`. GCC 6 started exploiting this particular kind of UB, resulting in runtime crashes. Fixes: nodejs#6724 PR-URL: nodejs#6738 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
assert(process.config.variables.hasOwnProperty('node_module_version')); | ||
|
||
// ensure that `node_module_version` is an Integer > 0 | ||
assert(!Number.isNaN(parseInt(process.config.variables.node_module_version))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing ;
LGTM with style nit. cc @nodejs/lts |
I'm not sure we'd actually backport this kinda thing to v0.10... @nodejs/lts |
I commented on that here. I think a case for an exception can be made here. |
For example at https://github.com/sass/node-sass/releases/tag/v3.8.0 we are building binaries for all known node modules versions. It would be easier to support and cross-compile to older node versions if they need not be installed. Having the same interface in the One uses always the latest v0.10, v0.12 etc. headers and |
a6be6b5
to
441d8b9
Compare
@saper you could hardwire values for 0.10 and 0.12 though, right? those are fixed numbers and not going to change (same with every other major but I take the point about it being easier into the future). |
9ff899f
to
d108c3b
Compare
I've no objections to backporting this to v0.10 with the caveat that anything that depends on This PR LGTM. |
@nodejs/lts ... any additional thoughts? I'm inclined to land unless there are objections. |
Should I prepare pull requests for 0.12 and LTS? |
@saper Yes, go ahead. One small style nit: can you capitalize the comments in the test? |
d108c3b
to
4c24cb3
Compare
Nit fixed, thank you. |
4c24cb3
to
cb47e37
Compare
ping @bnoordhuis ... does this LGTY? |
The test could use To who lands this: s/Provide/provide/ in the title of the commit and maybe drop the quotes so it fits in 50 columns. |
cb47e37
to
3f7a52b
Compare
Oh, right, didn't notice that this was against |
3f7a52b
to
7299eac
Compare
@jasnell just tried that and I think it might have worked (I got 5 commits after retarget so I have pushed a cherry-picked commit) |
@@ -0,0 +1,10 @@ | |||
'use strict'; | |||
require('../common'); | |||
var assert = require('assert'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use const
here please :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh.. ha! nevermind... v0.10.... silly me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we might actually want to add const
in the current trunk?
var assert = require('assert'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using const
in master, definitely, but by itself that's not enough of a reason to update the test case if it's not using const
already. Best to leave it unless there are other changes to make.
|
||
// Ensure that `node_module_version` is an Integer | ||
assert(!Number.isNaN(parseInt(process.config.variables.node_module_version))); | ||
assert.equal(process.config.variables.node_module_version, 11); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.strictEqual()
here instead of assert.equal()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I said assert.equal()
because I had a fuzzy notion that strictEqual() doesn't exist in v0.10. I was probably thinking of deepStrictEqual().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, happy to learn more about differences between node engines.
Enable targetting of a different node version than the currently running one when building binary modules. Based on nodejs/node@410296c37 PR-URL: nodejs#7808 Ref: nodejs/node-gyp#855
7299eac
to
6a47a07
Compare
Enable targetting of a different node version than the currently running one when building binary modules. Based on nodejs/node@410296c37 PR-URL: nodejs#8027 Ref: nodejs#7808 Ref: nodejs/node-gyp#855
@jasnell voilà! |
Enable targetting of a different node version than the currently running one when building binary modules. Based on nodejs/node@410296c37 PR-URL: nodejs#8171 Ref: nodejs#8027 Ref: nodejs#7808 Ref: nodejs/node-gyp#855
Enable targetting of a different node version than the currently running one when building binary modules. Based on 410296c37 PR-URL: #8171 Ref: #8027 Ref: #7808 Ref: nodejs/node-gyp#855 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
7f44ecf
to
35b49ed
Compare
Enable targetting of a different node version than the currently running one when building binary modules. Based on 410296c37 PR-URL: #8171 Ref: #8027 Ref: #7808 Ref: nodejs/node-gyp#855 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Enable targetting of a different node version than the currently running one when building binary modules. Based on 410296c37 PR-URL: #8171 Ref: #8027 Ref: #7808 Ref: nodejs/node-gyp#855 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Enable targetting of a different node version than the currently running one when building binary modules. Based on 410296c37 PR-URL: #8171 Ref: #8027 Ref: #7808 Ref: nodejs/node-gyp#855 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
@nodejs/lts... this appears to be the only still open PR based on v0.10-staging. Given that it's not likely that we'll be cutting a new v0.10, I recommend that we go ahead and close this. |
Enable targetting of a different node version than the currently running one when building binary modules. Based on nodejs/node@410296c37 PR-URL: nodejs#8027 Ref: nodejs#7808 Ref: nodejs/node-gyp#855
Enable targetting of a different node version than the currently running one when building binary modules. Based on nodejs/node@410296c37 PR-URL: nodejs#8027 Ref: nodejs#7808 Ref: nodejs/node-gyp#855
Closing given that v0.10 is no longer actively supported |
Thanks, if there will be no 0.10 release this makes no point. |
Enable targetting of a different node version than
the currently running one when building binary modules.
This is extracted from 410296c37
PR-URL: nodejs/node-gyp#855