-
-
Notifications
You must be signed in to change notification settings - Fork 350
Rework MSVC environment powershell configuration and description in CHANGES.txt and RELEASE.txt #4720
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
Rework MSVC environment powershell configuration and description in CHANGES.txt and RELEASE.txt #4720
Changes from 8 commits
da4d268
0797b2d
23eef47
d5ae431
b39e674
025a41d
f25895b
b5847cb
02133b1
40b6675
3290ac7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,17 +16,32 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER | |
| - Whatever John Doe did. | ||
|
|
||
| From Joseph Brill: | ||
| - MSVS: Fix a significant MSVC/MSVC tool initialization slowdown when | ||
| vcpkg has been installed and the PSModulePath is not initialized | ||
| or propagated from the user's shell environment. To resolve this | ||
| The default Windows Powershell 7 path is added before the default | ||
| Windows Powershell 5 path in the carefully constructed | ||
| environment in which the MSVC batch files are run. The shell | ||
| environment variables and values for VCPKG_DISABLE_METRICS and | ||
| VCPKG_ROOT are added to the limited MSVC environment when defined. | ||
| At present, the VCPKG_DISABLE_METRICS and VCPKG_ROOT variables and | ||
| values are not propagated to the SCons environment after running | ||
| the MSVC batch files. | ||
| - MSVC: A significant delay was experienced in the windows 2022 | ||
| and 2025 runners due to the limited environment in which the MSVC | ||
| batch files are invoked. The vcpkg component installed in Visual | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "If the vcpkg component is installed with Visual Studio installler"... ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reworked all text. |
||
| Studio invokes a powershell script when the MSVC batch files are | ||
| called. The limited MSVC environment 1) did not have the preferred | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ".. environment used by SCons to initialized MSVC"
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reworked all text. |
||
| pwsh executable on the system path, 2) did not include the powershell | ||
| module analysis cache location (PSModuleAnalysisCachePath), and 3) did | ||
| not include the powershell module path (PSModulePath) which appears to | ||
| be responsible for the performance degradation in the windows 2022 and | ||
| 2025 runners. The VS vcpkg component is not installed in the windows | ||
| 2019 runner. Adding the pwsh and powershell executable paths in the | ||
| order discovered on the shell environment path, passing the powershell | ||
| module analysis cache location, and adding a limited subset of the | ||
| powershell module path appears to have eliminated the significant | ||
| delays. In the windows runners, any one of the these three changes | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ".. Github Actions windows runners.."
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reworked all text. |
||
| appears to eliminite the significant delays. It is hoped that the | ||
| combination of all three changes will guard against significant | ||
| delays in other environment configurations as well. | ||
| - MSVC: The following shell variables and values are passed to the | ||
| environment in which the MSVC batch files are invoked: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "environment used by SCons to initialize MSVC"..
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reworked all text. |
||
| VCPKG_DISABLE_METRICS, VCPKG_ROOT, POWERSHELL_TELEMETRY_OPTOUT, | ||
| PSDisableModuleAnalysisCacheCleanup, and PSModuleAnalysisCachePath. | ||
| A limited subset of the shell PSModulePath environment variable value | ||
| is passed to the MSVC environment. None of these variables and values | ||
| are propagated to the SCons environment after running the MSVC batch | ||
| files. | ||
|
|
||
| From Bill Prendergast: | ||
| - Fixed SCons.Variables.PackageVariable to correctly test the default | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,17 +35,24 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY | |
| one from PEP 308 introduced in Python 2.5 (2006). The idiom being | ||
| replaced (using and/or) is regarded as error prone. | ||
|
|
||
| - MSVS: The default Windows powershell 7 path is added before the default | ||
| Windows powershell 5 path in the limited environment in which the | ||
| MSVC batch files are run. | ||
| - MSVC: The following shell environment variables are now included in | ||
| the environment in which the MSVC batch files are invoked when defined: | ||
| VCPKG_DISABLE_METRICS, VCPKG_ROOT, POWERSHELL_TELEMETRY_OPTOUT, | ||
| PSDisableModuleAnalysisCacheCleanup, and PSModuleAnalysisCachePath. | ||
| A subset of the shell environment PSModulePath path elements is | ||
| included in the limited environment in which the MSVC batch files | ||
| are invoked. | ||
|
|
||
| FIXES | ||
| ----- | ||
|
|
||
| - Fixed SCons.Variables.PackageVariable to correctly test the default | ||
| setting against both enable & disable strings. (Fixes #4702) | ||
| - MSVS: Fix significant slowdown initializing MSVC tools when vcpkg has | ||
| been installed on the system. | ||
|
|
||
| - MSVC: Fixed a significant delay that was experienced in the windows | ||
| 2022 and 2025 runners due to the limited environment in which the MSVC | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Github Actions windows..."
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reworked all text. |
||
| batch files are invoked. The windows 2019 runner was not affected. | ||
|
|
||
| - Fix the variant dir component being missing from generated source file | ||
| paths with CompilationDatabase() builder (Fixes #4003). | ||
|
|
||
|
|
||
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.
can you add "GitHub Actions runners', instead of runners?
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.
Reworked all text.