-
Notifications
You must be signed in to change notification settings - Fork 770
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
Fix vswhere for Build Tools #1753
Conversation
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.
Thanks for fixing this! I've left two small comments.
Also, the diff is not that bad on Reviewable!
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: 0 of 2 LGTMs obtained (waiting on @dkaszews)
build.py
line 150 at r1 (raw file):
def FindLatestMSVC( quiet, preview=False ): ACCEPTABLE_VERSIONS = [ 17, 16, 15 ]
This does not seem to be needed here.
build.py
line 162 at r1 (raw file):
vswhere_args.append( '-prerelease' ) if msvc := UseVsWhere( quiet, vswhere_args ):
:=
operator is python 3.9+.
We should hold back just a little longer. Python 3.8 goes EOL in October.
Yes, our CI uses python 3.9, but that's because new ubuntu does not have python 3.8 and I didn't want to drag in pyenv
to compile an old version.is_accessible
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.
Reviewable status: 0 of 2 LGTMs obtained (waiting on @bstaletic)
build.py
line 150 at r1 (raw file):
Previously, bstaletic (Boris Staletic) wrote…
This does not seem to be needed here.
It is used below for the registry loop. I moved it to file scope to remove duplication.
build.py
line 162 at r1 (raw file):
Previously, bstaletic (Boris Staletic) wrote…
:=
operator is python 3.9+.
We should hold back just a little longer. Python 3.8 goes EOL in October.Yes, our CI uses python 3.9, but that's because new ubuntu does not have python 3.8 and I didn't want to drag in
pyenv
to compile an old version.is_accessible
Walrus was introduced in 3.8: https://docs.python.org/3/whatsnew/3.8.html#assignment-expressions
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.
Reviewable status: 0 of 2 LGTMs obtained (waiting on @dkaszews)
build.py
line 150 at r1 (raw file):
Previously, dkaszews (Dominik Kaszewski) wrote…
It is used below for the registry loop. I moved it to file scope to remove duplication.
That was outside the diff. Yeah, let's move it to the file scope, with a better name for context.
I'm just not seeing the second push in the diff.
build.py
line 162 at r1 (raw file):
Previously, dkaszews (Dominik Kaszewski) wrote…
Walrus was introduced in 3.8: https://docs.python.org/3/whatsnew/3.8.html#assignment-expressions
So it is. Nevermind.
3db0bfa
to
4856081
Compare
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.
Reviewable status: 0 of 2 LGTMs obtained (waiting on @bstaletic)
build.py
line 150 at r1 (raw file):
Previously, bstaletic (Boris Staletic) wrote…
That was outside the diff. Yeah, let's move it to the file scope, with a better name for context.
I'm just not seeing the second push in the diff.
Pushed now, was having some connection issues
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: 1 of 2 LGTMs obtained (waiting on @dkaszews)
4856081
to
31b80ea
Compare
Turns out i did not merge the CI pull request when I thought I had. |
31b80ea
to
6f1f4f8
Compare
Rebased again |
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.
Reviewed all commit messages.
Reviewable status: 1 of 2 LGTMs obtained (waiting on @dkaszews)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1753 +/- ##
==========================================
+ Coverage 95.49% 95.87% +0.38%
==========================================
Files 52 84 +32
Lines 6947 8437 +1490
Branches 0 163 +163
==========================================
+ Hits 6634 8089 +1455
+ Misses 313 298 -15
- Partials 0 50 +50 |
Thanks for sending a PR! |
According to microsoft/vswhere#22,
vswhere.exe
only finds full Visual Studio IDE instances. To find a naked Build Tools instance, one needs to explicitly add-products 'Microsoft.VisualStudio.Product.BuildTools'
to the call, but that won't find IDE instances in turn.The PR adds the second form as a fallback to support users who only have Build Tools installed without the full IDE.
This change is