Skip to content

[release/v7.6.1] Add comment-based help documentation to build.psm1 functions#27216

Merged
daxian-dbw merged 1 commit intoPowerShell:release/v7.6.1from
daxian-dbw:backport/release/v7.6.1/27122-1216cb7be
Apr 9, 2026
Merged

[release/v7.6.1] Add comment-based help documentation to build.psm1 functions#27216
daxian-dbw merged 1 commit intoPowerShell:release/v7.6.1from
daxian-dbw:backport/release/v7.6.1/27122-1216cb7be

Conversation

@daxian-dbw
Copy link
Copy Markdown
Member

Backport of #27122 to release/v7.6.1

Triggered by @daxian-dbw on behalf of @powercode

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Backports comment-based help for build.psm1 module functions to improve maintainability and discoverability of the release build tooling without changing the tooling behavior itself.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified by cherry-picking onto release/v7.6.1 without conflicts. This is a documentation-only tooling change; no local test run was necessary, and CI on the backport PR will validate that no unintended formatting or syntax issues were introduced.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Low risk because the change only adds comment-based help to existing PowerShell build module functions and does not alter functional behavior.

@daxian-dbw daxian-dbw added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 9, 2026
@daxian-dbw daxian-dbw requested review from a team and jshigetomi as code owners April 9, 2026 05:52
Copilot AI review requested due to automatic review settings April 9, 2026 05:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backport of PR #27122 to release/v7.6.1, primarily adding comment-based help (CBH) across build.psm1 functions to improve discoverability of build tooling.

Changes:

  • Added CBH blocks (.SYNOPSIS/.DESCRIPTION/.PARAMETER/.OUTPUTS) to many build.psm1 functions.
  • Removed/replaced an old inline comment block in ConvertFrom-PesterLog with proper CBH.
  • Includes a couple of non-doc functional edits in the Pester path handling and unelevated-process arm64 gating.

Comment thread build.psm1
.PARAMETER Configuration
The build configuration: Debug (default), Release, CodeCoverage, or StaticAnalysis.
.PARAMETER Framework
The target .NET framework moniker. Defaults to 'net11.0'.
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment-based help for New-PSOptions says the default framework is 'net11.0', but the parameter ValidateSet/default value below is 'net10.0'. This makes the help inaccurate; update the help text to match the actual default/framework options.

Suggested change
The target .NET framework moniker. Defaults to 'net11.0'.
The target .NET framework moniker. Defaults to 'net10.0'.

Copilot uses AI. Check for mistakes.
Comment thread build.psm1
.PARAMETER PSModuleRestore
Whether Gallery modules should be restored to the build output.
.PARAMETER Framework
The target .NET framework moniker, e.g. 'net11.0'.
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New-PSOptionsObject help uses 'net11.0' as the example framework moniker, but New-PSOptions currently constrains the Framework parameter to 'net10.0'. Update this example so the help reflects the actual supported/expected framework value for this branch.

Suggested change
The target .NET framework moniker, e.g. 'net11.0'.
The target .NET framework moniker, e.g. 'net10.0'.

Copilot uses AI. Check for mistakes.
Comment thread build.psm1
Comment on lines 1748 to 1753
}

if($IncludeCommonTests.IsPresent)
{
$path = += "$PSScriptRoot/test/common"
$path += "$PSScriptRoot/test/common"
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description states this is a documentation-only backport, but this hunk includes a functional code fix (updating the test path list when -IncludeCommonTests is set). If these behavior changes are intended, please update the PR description and testing notes accordingly; otherwise, consider reverting/splitting the code changes from the documentation backport.

Copilot uses AI. Check for mistakes.
Comment thread build.psm1
Comment on lines 2158 to 2165
if (-not $environment.IsWindows)
{
throw "Start-UnelevatedProcess is currently not supported on non-Windows platforms"
}

if (-not $environment.OSArchitecture -eq 'arm64')
if ($environment.OSArchitecture -eq 'arm64')
{
throw "Start-UnelevatedProcess is currently not supported on arm64 platforms"
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the change is documentation-only, but this hunk changes behavior for Start-UnelevatedProcess by altering the arm64 architecture check. If this fix is intentional, please call it out in the PR description/testing notes; otherwise, consider reverting/splitting it from the documentation backport.

Copilot uses AI. Check for mistakes.
@daxian-dbw daxian-dbw merged commit d41f768 into PowerShell:release/v7.6.1 Apr 9, 2026
42 checks passed
@daxian-dbw daxian-dbw deleted the backport/release/v7.6.1/27122-1216cb7be branch April 9, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants