-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
configure: fix type of arm_version #14595
Conversation
arm_version is compared with an integer 7 in V8's GYP files, instead of the string "7", so it seems that this variable should be an integer when it is representing a version number. Its default value in V8's standalone.gypi seconds this. It also seems that GYP can quietly convert an integer-like string to an integer in some scenarios, maybe during the merge of some dictionaries, so luckily no actual problem happens at the moment. However, the subtle difference between 7 and "7" will be observed when a new GYP variable is added to V8's toolchain.gypi like this: { 'variables': { ... 'conditions': [ ... ['arm_version==7', { 'myvar%': 'abc', }], ], ... }, ... } Interestingly no implicit conversion happens here when arm_version is "7", so GYP will complain about the undefined variable <(myvar) if it's referenced later on.
Won't this break any/all existing binding.gyp files out in the wild that currently check against the string version? Also, it seems like you should be guarding against (in one way or another) undefined variables like that, especially when the variable is defined within a conditional. |
I have the same concern, so looking forward to more feedback.
Do you mean something like this:
Absolutely later references to myvar should be guarded, though I didn't mention that before for simplicity. However, the two 'arm_version==7' expressions are evaluated to different results, and in fact the case is the origination of my confusion. |
Interestingly from a quick look at a GitHub search it seems it's more common to compare to a number then to a string (clones of V8's toolchain.gypi are very popular) so it seems like this will do more good then harm. But if we want to be extra conservative you could define a new var /cc @bnoordhuis @nodejs/platform-arm |
@nodejs/build PTAL |
Again @nodejs/build PTAL |
@nodejs/platform-arm PTAL |
Ping @nodejs/tsc |
I am marking this defensively as semver-major. |
@nodejs/tsc PTAL |
@nodejs/tsc PTAL! |
still LGTM |
Well, it still needs another LG |
I'll be surprised if this uncovers any problems, but we should do this for all semver-major changes, so... CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1107/ |
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.
FWIW
Needs one more TSC member approval and the most obvious reviewer is @rvagg so...ping! |
Did somebody review the citgm results to figure out if they are ok or not ? |
Can you please rebase this against master and then run CITGM again. CITGM was run against a head that was still pre-release |
You can instruct the citgm-smoker job to rebase against |
CITGM with rebase against master (I think--I put |
meh, I think I'm -0 on this for now. We're making a pretty safe assumption that (a) we're limited to Cortex-A and (b) ARM will stick with its numbering. But let's take a look at both of those:
But as I said, pretty safe assumption that it won't change in the near future, hence I'm not a full -1 here. I'd probably be happier with @bnoordhuis any thoughts from you? |
I've run citgm against the latest v9.x release to compare https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker-nobuild/205/ I'm going to start auditing the failures and figure out if we can get closer to green |
@MylesBorins what was the result of the audit? Did it look good or not really? |
Ping @MylesBorins |
@nodejs/tsc PTAL. This needs another LG and it is somewhat controversial. |
Considering #14595 (comment) I am -0 towards this change, |
I'm completely neutral on this. I feel like it's probably OK but I defer to people like @rvagg and @joyeecheung on this sort of stuff. I'm only leaving this comment because I know there's a need for another TSC approval and I wanted to explain why I've not been the one to come along and give it. |
I have no ground to make an informed decision here. I do not see how much of the ecosystem could be broken by this PR. |
Same. |
I think Rod's comment here make sense, also -0. |
This was discussed in the TSC meeting, but people were not comfortable that we have enough data showing that it won't cause breakage for users. Since it does not seem to fix an urgent issue until there is more data/discussion it needs to wait. |
As most people do not seem comfortable with this I am going to close it. @hujiajie thanks a lot for your work! It is much appreciated even though this did not land! If anyone feels like closing this is a mistake, please leave a comment / reopen. |
arm_version is compared with an integer 7 in V8's GYP files, instead of the string "7", so it seems that this variable should be an integer when it is representing a version number. Its default value in V8's
standalone.gypi seconds this.
It also seems that GYP can quietly convert an integer-like string to an integer in some scenarios, maybe during the merge of some dictionaries, so luckily no actual problem happens at the moment. However, the subtle difference between 7 and "7" will be observed when a new GYP variable is added to V8's toolchain.gypi like this:
Interestingly no implicit conversion happens here when arm_version is "7", so GYP will complain about the undefined variable <(myvar) if it's referenced later on.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build, arm