Skip to content

The module's version has three parts - #103

Merged
HalRiveria merged 2 commits into
mainfrom
fix/module-version
Dec 2, 2026
Merged

HalRiveria merged 2 commits into
mainfrom
fix/module-version

Conversation

@HalRiveria-Bot

Copy link
Copy Markdown
Collaborator

Installing the module on Windows PowerShell 5.1 put it where PowerShell can't find it.

What was wrong

Compress-PSResource gives the package a three-part version (4.0.0) whatever the manifest says. Windows PowerShell 5.1's built-in PowerShellGet (1.0.0.1) installs into a folder named after the package's version, ParallelKit\4.0.0, but the manifest said ModuleVersion = '4.0'. PowerShell doesn't find a module whose version folder isn't its manifest's version, so after Install-Module, Import-Module ParallelKit failed. PowerShell 7's Install-Module and Install-PSResource name the folder after the manifest's version, so they worked.

What changed

  • Build/New-ParallelKitModule.ps1 writes the manifest's version with three parts: the kit's 4.0 is the module's 4.0.0, and an X.Y.Z version stays as it is. The kit itself still reports 4.0.
  • The harness's -AsModule run builds into a folder named the way Install-Module names it, and imports that version.
  • Section BM checks the manifest's version for a two-part and a three-part kit version. It also keeps going when Test-ModuleManifest rejects the folder's name, rather than stopping the run.
  • The README gives the rule (the kit's X.Y is the module's X.Y.0), so Get-Module shows 4.0.0 for the kit's 4.0, and that's the version -RequiredVersion takes.

Tests

  • An install from a local repository, with the package from the 4.0 version branch: on 5.1 with PowerShellGet 1.0.0.1 the module isn't found after installing. With the manifest at 4.0.0, it installs into 4.0.0 and loads by name and by auto-loading on 5.1 (PowerShellGet 1.0.0.1) and 7.6.2 (PowerShellGet 2.2.5 and PSResourceGet 1.2.0), running a program and a runspace batch in each.
  • Section BM with the old generator: 6 failures, including the new version check and loading by name. With this one it passes.
  • Full harness: 723 passed on Windows PowerShell 5.1 and on PowerShell 7.6.2, and 722 on each as the module. After the review's two small follow-ups (a test message, the README line), section BM passes on both.
  • To do once this branch's package is built: the same install test with it.

🤖 Generated with Claude Code

HalRiveria and others added 2 commits December 1, 2026 23:04
Windows PowerShell's built-in PowerShellGet (1.0.0.1) installed the 4.0
module into a 4.0.0 folder, since Compress-PSResource gives the package a
three-part version, while the manifest said 4.0. PowerShell doesn't find a
module whose version folder isn't its manifest's version, so after
Install-Module, Import-Module ParallelKit failed. PowerShell 7's installers
use the manifest's version and weren't affected.

The generator now writes the manifest's version with three parts: the kit's
4.0 is the module's 4.0.0, and an X.Y.Z version stays as it is. The kit
itself still reports 4.0. The README says so.

The harness builds its module into a folder named the way Install-Module
names it, and section BM checks the manifest's version for a two- and a
three-part kit version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he version rule in general

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HalRiveria
HalRiveria merged commit 94aa349 into main Dec 2, 2026
5 checks passed
@HalRiveria
HalRiveria deleted the fix/module-version branch December 2, 2026 04:37
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