-
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,win: restore vcbuild TAG functionality #18031
Conversation
@rvagg could you add an explanation to the commit message? I'm not following how this would fix the problem. |
@gibfahn Probably that |
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 confirm that it works (though I was very confused for a bit because TAG is one of the environment variables that gets leaked to the environment so if you do vcbuild clean
followed by vcbuild x64 release
, it sets the right versions because the clean set up the TAG variable for the following invocation of vcbuild. Sigh.
However, this patch appears to work correctly on my machine- much appreciated, @rvagg - thanks for fixing!
P.S: +1 to adding a comment to this change indicating that TAG needs to be checked after |
--tag needs to be set after `getnodeversion` because TAG is defined in there when DISTTYPE is not "release", setting it before `getnodeversion` leads to --tag not being passed down in to `configure` and src/node_version.h setting it as `-pre` by default. This change restores the functionality that properly sets the TAG for nightlies, rc builds and other custom build types. Ref: nodejs#17299 Ref: nodejs/abi-stable-node#289
Thanks for testing @digitalinfinity! I've updated the commit message with much more detail explaining what's going on. This variable leakage is one of the most painful things about vcbuild.bat, it gets very confusing and can ruin subsequent runs. Do you have any thoughts on what we should be doing here to improve the situation? Should we just be planning on converting this whole thing to PowerShell or is there some other build scripting language that we should be aiming for these days? vcbuild.bat is a complicated mess that very few people can understand but it's actually pretty simple (way too simple compared to what we do in Makefile) if you were to lay the basic logic out. |
217e689
to
c1b106a
Compare
Discussed in #12310, I think PowerShell had the most support. @refack actually did a lot of the porting work already: https://gist.github.com/refack/969ecc6642981bfd7caef7d948d78076 |
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.
Built two test releases: before this change and after this change. The second has correct process.release
information, confirming this PR fixes the issue.
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.
LGTM
Pretty sure ARM failure was not related, but new CI just in case: https://ci.nodejs.org/job/node-test-pull-request/12508/ |
ARM failure was unrelated, will land. |
Landed as b225970 |
--tag needs to be set after `getnodeversion` because TAG is defined in there when DISTTYPE is not "release", setting it before `getnodeversion` leads to --tag not being passed down in to `configure` and src/node_version.h setting it as `-pre` by default. This change restores the functionality that properly sets the TAG for nightlies, rc builds and other custom build types. Ref: #17299 Ref: nodejs/abi-stable-node#289 PR-URL: #18031 Ref: #17299 Ref: nodejs/abi-stable-node#289 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: JoãReis <reis@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
@mhdawson It looks like this fix needs a backport to v8.x, what's the process for that? |
--tag needs to be set after `getnodeversion` because TAG is defined in there when DISTTYPE is not "release", setting it before `getnodeversion` leads to --tag not being passed down in to `configure` and src/node_version.h setting it as `-pre` by default. This change restores the functionality that properly sets the TAG for nightlies, rc builds and other custom build types. Ref: nodejs/node#17299 Ref: nodejs/abi-stable-node#289 PR-URL: nodejs/node#18031 Ref: nodejs/node#17299 Ref: nodejs/abi-stable-node#289 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: JoãReis <reis@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Given that this is build script regression fix, I'm inclined to bring it back in the next v8.x releases to fix our nightly builds. Thoughts @nodejs/lts? It doesn't need to go back to v6.x as #17299 didn't. |
No objections here. |
Are we supposed to be producing nightly builds on 8.x? We appear to have stopped for 8.x since last November (8.9.1): https://nodejs.org/download/nightly/ cc @nodejs/build |
We are currently producing nightlies from |
--tag needs to be set after `getnodeversion` because TAG is defined in there when DISTTYPE is not "release", setting it before `getnodeversion` leads to --tag not being passed down in to `configure` and src/node_version.h setting it as `-pre` by default. This change restores the functionality that properly sets the TAG for nightlies, rc builds and other custom build types. Ref: #17299 Ref: nodejs/abi-stable-node#289 PR-URL: #18031 Ref: #17299 Ref: nodejs/abi-stable-node#289 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: JoãReis <reis@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
--tag needs to be set after `getnodeversion` because TAG is defined in there when DISTTYPE is not "release", setting it before `getnodeversion` leads to --tag not being passed down in to `configure` and src/node_version.h setting it as `-pre` by default. This change restores the functionality that properly sets the TAG for nightlies, rc builds and other custom build types. Ref: #17299 Ref: nodejs/abi-stable-node#289 PR-URL: #18031 Ref: #17299 Ref: nodejs/abi-stable-node#289 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: JoãReis <reis@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
--tag needs to be set after `getnodeversion` because TAG is defined in there when DISTTYPE is not "release", setting it before `getnodeversion` leads to --tag not being passed down in to `configure` and src/node_version.h setting it as `-pre` by default. This change restores the functionality that properly sets the TAG for nightlies, rc builds and other custom build types. Ref: #17299 Ref: nodejs/abi-stable-node#289 PR-URL: #18031 Ref: #17299 Ref: nodejs/abi-stable-node#289 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: JoãReis <reis@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Ref: #17299
Ref: nodejs/abi-stable-node#289
/cc @refack @digitalinfinity @mhdawson
Would someone mind testing this on a Windows machine please?
something like this (off the top of my head, I don't have a Windows machine to tinker with right at this moment):