Skip to content

Make pwsh configurable on Windows - #719

Merged
jkloetzke merged 5 commits into
BobBuildTool:masterfrom
jkloetzke:windows-pwsh-configurable
Oct 8, 2026
Merged

jkloetzke merged 5 commits into
BobBuildTool:masterfrom
jkloetzke:windows-pwsh-configurable

Conversation

@jkloetzke

Copy link
Copy Markdown
Member

Historically Bob has used powershell.exe on Windows (Powershell 5) while all other platforms have used pwsh (Powershell 7). Make it configurable on Windows.

Allow projects to configure the PowerShell executable that is used on
Windows. This enables the usage of PowerShell 7 (pwsh.exe) instead of
the legacy Windows PowerShell. This is a project wide setting that is
only taken from the root project. Defaults to "powershell" for
backwards compatibility. Other platforms always use "pwsh".
Verify the config.yaml parsing including the project wide semantics, the
propagation through the IR into the StepSpec and the interpreter
selection of the PowerShell language.
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.51%. Comparing base (7baba22) to head (d317961).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #719      +/-   ##
==========================================
- Coverage   89.89%   89.51%   -0.38%     
==========================================
  Files          50       50              
  Lines       16897    16915      +18     
==========================================
- Hits        15189    15142      -47     
- Misses       1708     1773      +65     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The legacy powershell is horribly slow on Github actions.
Maybe it helps to speed things up...
@jkloetzke
jkloetzke force-pushed the windows-pwsh-configurable branch from 6000504 to d317961 Compare October 7, 2026 18:41
@jkloetzke

Copy link
Copy Markdown
Member Author

@sbixl Any opinion on this? The main motivation is Github actions where it takes ages (20s+!) to start a script with powershell.exe. This reliably pushed #716 beyond the 20 Minutes mark. Moving to pwsh.exe most probably solves the problem.

@sbixl

sbixl commented Oct 8, 2026

Copy link
Copy Markdown

In principle, I consider this feature highly valuable, as it would help reduce the dependency on PowerShell 5.x. I tested a migration to PowerShell 7 in our environment, but encountered compatibility issues that currently prevent a seamless transition. As a result, I am unable to provide any reliable performance benchmarks for comparison.

Nevertheless, I would still recommend proceeding with the implementation of this feature. I'll investigate the compatibility issues further when I have an opportunity to do so.

@jkloetzke

Copy link
Copy Markdown
Member Author

Thanks for the feedback.

@jkloetzke
jkloetzke merged commit f70cb99 into BobBuildTool:master Oct 8, 2026
9 of 11 checks passed
@jkloetzke
jkloetzke deleted the windows-pwsh-configurable branch October 8, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants