Closed Bug 1522560 Opened 5 years ago Closed 5 years ago

Use vswhere from Visual Studio Installer and remove in tree vswhere binary

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: bryce, Assigned: glandium)

Details

Attachments

(1 file, 1 obsolete file)

The vswhere.exe in tree is at version 1.0.62. This is a fair bit behind the current release of 2.5.9. My prime motivation for suggesting we update is easier handling of prerelease Visual Studios.

Our current vswhere will return all Visual Studios installed. This causes flakiness if you have VS2019 installed. However, newer versions of vswhere require the -prerelease flag in order to show prerelease versions.

My understanding is that we do not officially support VS2019 (though we may in future). Our current vswhere invocation picks ups 2019 installs, but if we drop in version 2.5.9 we will only pick up 2017 installs (as we're not invoking with the -prerelease flag). This avoids people footgunning themselves by installing VS2019 and breaking their builds.

Considering bug 1512504, I'm inclined to say this is wontfix.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX

(In reply to Mike Hommey [:glandium] from comment #3)

Considering bug 1512504, I'm inclined to say this is wontfix.

Will this remove the need to lookup visual studio installs? My understanding, though limited, is that we still do lookups when building with clang as we need headers and libs from msvc?

I don't think bug 1512504 makes a difference here--we still need to use vswhere to locate the Microsoft SDK and include/lib paths. (This sucks but I don't know of a better solution.)

Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---

Actually, vswhere is provided by the Visual Studio installer, at a fixed location (see https://github.com/Microsoft/vswhere/wiki#installing). And the in-tree vswhere is never going to find something that hasn't already installed that file as a side effect.

So I'd argue we should remove the in-tree vswhere file, and pick that file the installer installs.

And remove the in-tree one.

(In reply to Mike Hommey [:glandium] from comment #7)

Created attachment 9039388 [details]
Bug 1522560 - Use system vswhere.exe.

And remove the in-tree one.

Does this patch work on your machine?

Flags: needinfo?(bvandyk)
Attachment #9038873 - Attachment is obsolete: true

Looks good on my end.

Flags: needinfo?(bvandyk)
Assignee: nobody → mh+mozilla
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/715355e248a1
Use system vswhere.exe. r=dmajor
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Summary: Update in tree vswhere to 2.5.9 → Use vswhere from Visual Studio Installer and remove in tree vswhere binary
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: