-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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 generating vsproj with SCons 4.6.0+ #85357
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mhilbrunner
force-pushed
the
fix-generate-vsproj
branch
from
November 25, 2023 19:57
d187b03
to
19f832b
Compare
mhilbrunner
force-pushed
the
fix-generate-vsproj
branch
from
November 25, 2023 20:27
19f832b
to
7211013
Compare
akien-mga
approved these changes
Nov 25, 2023
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.
Looks good to me.
akien-mga
added
cherrypick:3.x
Considered for cherry-picking into a future 3.x release
cherrypick:3.5
Considered for cherry-picking into a future 3.5.x release
cherrypick:4.0
cherrypick:4.1
Considered for cherry-picking into a future 4.1.x release
labels
Nov 25, 2023
Thanks! |
Cherry-picked for 4.1.4. |
akien-mga
removed
the
cherrypick:4.1
Considered for cherry-picking into a future 4.1.x release
label
Jan 16, 2024
Cherry-picked for 3.6. |
akien-mga
removed
the
cherrypick:3.x
Considered for cherry-picking into a future 3.x release
label
Jan 16, 2024
Cherry-picked for 3.5.4. |
akien-mga
removed
the
cherrypick:3.5
Considered for cherry-picking into a future 3.5.x release
label
Jan 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Visual Studio project generation broke after the signature of
find_batch_file()
was changed in SCons 4.6.0+ (in SCons/scons@7082c53ff6). Thanks to mwichmann for pointing that out in #85262 (comment).I can confirm that with these changes,
vsproj=yes
once again produces a VS solution as before, while I could reproduce the build failing without these changes.I've also renamed the variable
version
tomsvc_version
for clarity. Otherwise, this just avoids passingenv
tofind_batch_file()
in SCons 4.6.0+, where that is no longer accepted. Instead, we need to find the product directory fromenv
ourselves, asfind_batch_file()
previously did internally viafind_vc_pdir()
, which we now call ourselves.find_vc_pdir()
can in theory throw exceptions if the MSVC version is unsupported (UnsupportedVersion
exception) or something unexpected occurs, but catching these wouldn't make much sense IMO, as we can't do much besides fail. Just having the build fail with these exceptions as in other cases here should be explicit enough.We should see if we can remove some of the reliance on SCons internals here in the future. Some other stuff could likely be improved as well, but I tried to keep this minimal to get builds working again ASAP, and considering the time in the 4.2 dev cycle.
Fixes #85262.