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

build,win: restore vcbuild TAG functionality #18031

Closed
wants to merge 1 commit into from

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Jan 8, 2018

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):

set DISTTYPE=nightly
set DATESTRING=20180108
set COMMIT=abc123
vcbuild.bat build x64

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform. labels Jan 8, 2018
@gibfahn
Copy link
Member

gibfahn commented Jan 8, 2018

@rvagg could you add an explanation to the commit message? I'm not following how this would fix the problem.

@richardlau
Copy link
Member

@gibfahn Probably that TAG is defined in the :getnodeversion subroutine and therefore should be added to configure_flags after the call :getnodeversion.

Copy link
Contributor

@digitalinfinity digitalinfinity left a 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!

@digitalinfinity
Copy link
Contributor

P.S: +1 to adding a comment to this change indicating that TAG needs to be checked after getnodeversion is called.

--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
@rvagg
Copy link
Member Author

rvagg commented Jan 9, 2018

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.

@rvagg rvagg force-pushed the rvagg/vcbuild-tag-restore branch from 217e689 to c1b106a Compare January 9, 2018 03:35
@richardlau
Copy link
Member

richardlau commented Jan 9, 2018

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?

setlocal / endlocal?

edit We've tried this and reverted: #16270

@gibfahn
Copy link
Member

gibfahn commented Jan 9, 2018

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?

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

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.

Built two test releases: before this change and after this change. The second has correct process.release information, confirming this PR fixes the issue.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson
Copy link
Member

@mhdawson
Copy link
Member

Pretty sure ARM failure was not related, but new CI just in case: https://ci.nodejs.org/job/node-test-pull-request/12508/

@mhdawson
Copy link
Member

ARM failure was unrelated, will land.

@mhdawson
Copy link
Member

Landed as b225970

@mhdawson mhdawson closed this Jan 11, 2018
mhdawson pushed a commit that referenced this pull request Jan 11, 2018
--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>
@kfarnung
Copy link
Contributor

@mhdawson It looks like this fix needs a backport to v8.x, what's the process for that?

kfarnung pushed a commit to kfarnung/node-chakracore that referenced this pull request Jan 11, 2018
--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>
@gibfahn
Copy link
Member

gibfahn commented Jan 12, 2018

It looks like this fix needs a backport to v8.x, what's the process for that?

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.

@richardlau
Copy link
Member

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.

No objections here.

@richardlau
Copy link
Member

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.

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

@joaocgreis
Copy link
Member

We are currently producing nightlies from 9.x-staging and master. In nodejs/Release#229 we decided not to produce nightlies for LTS, but we can easily start if anyone finds them useful.

evanlucas pushed a commit that referenced this pull request Jan 30, 2018
--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>
@joaocgreis joaocgreis mentioned this pull request May 9, 2018
MylesBorins pushed a commit that referenced this pull request May 15, 2018
--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>
MylesBorins pushed a commit that referenced this pull request May 15, 2018
--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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants