PowerShell / PowerShell/PowerShell

Test-ModuleManifest Tag property stacks

Open
#17,694 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

In-PR Needs-Triage WG-Engine-Module
Dominant language
C#
Stars
55.5k
Forks
8.5k
Avg merge
1d 2h
Merged PRs (30d)
88

Description

Prerequisites
Steps to reproduce

Test-ModuleManifest Tag property stacks

Didn't have time to review completly please confirm.

Check in master an may spoted the bug. Please see Error Details

$data = Test-ModuleManifest -Path "$PackageManifest"
Write-Host "$($data.Tags.Count)"
$data = Test-ModuleManifest -Path "$PackageManifest"
Write-Host "$($data.Tags.Count)"
$data = Test-ModuleManifest -Path "$PackageManifest"
Write-Host "$($data.Tags.Count)"
$data = Test-ModuleManifest -Path "$PackageManifest"
Write-Host "$($data.Tags.Count)"
$data = Test-ModuleManifest -Path "$PackageManifest"
Write-Host "$($data.Tags.Count)"
$data = Test-ModuleManifest -Path "$PackageManifest"
Write-Host "$($data.Tags.Count)"
Expected behavior
2
2
2
2
2
2
Actual behavior
...
50
52
54
56
58
60
...
Error details
Please review in ModuleCmdletBase.cs
Line 3225 till 3236

In conjunction with PSModuleInfo.cs
Line 318 till 356
Environment data
Name                           Value
----                           -----
PSVersion                      5.1.19041.1682
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1682
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the repeated Test-ModuleManifest calls and checking that the tag count grows instead of remaining at 2. Read ModuleCmdletBase.cs lines 3225-3236 alongside PSModuleInfo.cs lines 318-356, then verify the behavior against the expected repeated counts shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.