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

tools: bump vswhere helper to 2.0.0 #14557

Merged
merged 1 commit into from
Sep 3, 2017

Conversation

refack
Copy link
Contributor

@refack refack commented Jul 31, 2017

  • enable explicit detection of prerelease VS versions with
    set VSWHERE_WITH_PRERELASE=1

/cc @nodejs/platform-windows @nodejs/build

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

tools,build,windows

@nodejs-github-bot nodejs-github-bot added install Issues and PRs related to the installers. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform. labels Jul 31, 2017
@refack
Copy link
Contributor Author

refack commented Jul 31, 2017

@refack refack force-pushed the bump-vswhere-helper-1.15.3 branch from 97abb71 to 104cc4e Compare July 31, 2017 18:49
@refack
Copy link
Contributor Author

refack commented Jul 31, 2017

@refack refack requested review from seishun and tniessen July 31, 2017 20:05
@refack refack self-assigned this Jul 31, 2017
@refack refack changed the title tools: bump vswhere helper to 1.15.3 tools: bump vswhere helper to 1.15.4 Jul 31, 2017
@refack refack requested review from joaocgreis and bzoz July 31, 2017 20:06
Copy link
Contributor

@seishun seishun left a comment

Choose a reason for hiding this comment

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

Switching between release and preview requires closing and re-opening cmd. Is that intended?

@refack
Copy link
Contributor Author

refack commented Jul 31, 2017

Switching between release and preview requires closing and re-opening cmd. Is that intended?

So that is a tricky one, since we short-circuit the call to vcvarsall because it can take up to 60s you need to break it by resetting VisualStudioVersion=.
so set VisualStudioVersion=& VSWHERE_WITH_PRERELASE=1& vcbuild vs2017

@refack
Copy link
Contributor Author

refack commented Jul 31, 2017

@seishun what I could do is treat vs2017 as a "force redetection argument" so:
vcbuild - use best version or the one currently set up
vcbuild vs2017 - force redetection of VS2017
vcbuild vs2015 - uses VS140COMNTOOLS which is a singelton anyway

But I'm not sure 🤔 ...

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

I can't really test this locally as I am stuck to VS 2015 which does not have vswhere as far as I know, but the changes themselves LGTM. Hoping for some feedback from @nodejs/platform-windows who use VS 2017.

if not exist "%InstallerPath%" set "InstallerPath=%ProgramFiles%\Microsoft Visual Studio\Installer"
if not exist "%InstallerPath%" goto :no-vswhere
:: Manipulate %Path% for easier " handeling
set Path=%Path%;%InstallerPath%
Copy link
Member

Choose a reason for hiding this comment

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

Even though I don't think quotes are strictly necessary here, I would prefer consistency with line 8.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I usually don't like adding stuff "just to be safe", but since I don't know exactly why or how this might break (but it probably will for someone), I added them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I can't remember why I use the %Path% trick... But I do remember that "%InstallerPath%"\vswhere.exe doesn't work is some cases

@refack refack changed the title tools: bump vswhere helper to 1.15.4 tools: bump vswhere helper to 1.15.5 Aug 1, 2017
@seishun
Copy link
Contributor

seishun commented Aug 1, 2017

we short-circuit the call to vcvarsall because it can take up to 60s

Really? It takes less than a second for me.

vcbuild.bat Outdated
@@ -1,4 +1,4 @@
@echo off
:: @echo off
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this on purpose or leftover from debugging?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦‍♂️
Removed.

:no-vswhere
endlocal
echo could not find "vswhere"
exit /B 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing new line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@refack refack force-pushed the bump-vswhere-helper-1.15.3 branch from 8020eb0 to 7b51cb1 Compare August 1, 2017 11:06
@refack
Copy link
Contributor Author

refack commented Aug 1, 2017

we short-circuit the call to vcvarsall because it can take up to 60s

Really? It takes less than a second for me.

with VS2017? it used to be 10s, but it keeps getting worse (maybe because I have 3 installation side by side)

@refack
Copy link
Contributor Author

refack commented Aug 20, 2017

Updated to v2.0.0 because there was a typo in VSWHERE_WITH_PREREALASE
PTAL

@BridgeAR
Copy link
Member

Ping @bzoz

@refack refack changed the title tools: bump vswhere helper to 1.15.5 tools: bump vswhere helper to 2.0.0 Aug 31, 2017
@bzoz
Copy link
Contributor

bzoz commented Sep 1, 2017

LGTM if the CI is green. https://ci.nodejs.org/job/node-test-pull-request/9910/

@benjamingr
Copy link
Member

@bzoz
Copy link
Contributor

bzoz commented Sep 1, 2017

I guess the only thing that really matters here is if node-compile-windows is green. It is, tests also look OK, so LGTM.

* enable explicit detection of prerelease VS versions with
  `set VSWHERE_WITH_PRERELEASE=1`

PR-URL: nodejs#14557
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Bartosz Sosnowski <[email protected]>
@refack refack merged commit 98d8db3 into nodejs:master Sep 3, 2017
@refack refack deleted the bump-vswhere-helper-1.15.3 branch September 4, 2017 21:53
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 5, 2017
* enable explicit detection of prerelease VS versions with
  `set VSWHERE_WITH_PRERELEASE=1`

PR-URL: nodejs/node#14557
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Bartosz Sosnowski <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
* enable explicit detection of prerelease VS versions with
  `set VSWHERE_WITH_PRERELEASE=1`

PR-URL: #14557
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Bartosz Sosnowski <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Sep 10, 2017
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
* enable explicit detection of prerelease VS versions with
  `set VSWHERE_WITH_PRERELEASE=1`

PR-URL: #14557
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Bartosz Sosnowski <[email protected]>
@MylesBorins
Copy link
Contributor

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

@MylesBorins
Copy link
Contributor

ping

@MylesBorins
Copy link
Contributor

ping @refack

@refack
Copy link
Contributor Author

refack commented Nov 14, 2017

No need as there's no VS2017 support on v6.x

@refack refack removed their assignment Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Issues and PRs related to the installers. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants