Skip to content

feat!: Raise the consumer psake floor to 5.0.4 - #181

Merged
tablackburn merged 2 commits into
mainfrom
feature/166-raise-psake-floor
Aug 26, 2026
Merged

feat!: Raise the consumer psake floor to 5.0.4#181
tablackburn merged 2 commits into
mainfrom
feature/166-raise-psake-floor

Conversation

@tablackburn

Copy link
Copy Markdown
Contributor

Closes #166. Part of #120 (Phase 3).

Breaking. RequiredModules now requires psake 5.0.4 or newer, previously 4.9.0. psake
4.x is no longer supported. Invoke-Build users are unaffected.

Why — the argument that holds

The floors this module declares were not all earned the same way:

Dependency Floor What CI actually tests
BuildHelpers 2.0.16 2.0.16
Pester 5.6.1 6.0.0 and 5.9.0 — both majors, via the #137 matrix
psake 4.9.05.0.4 5.0.4 only

Pester's lower floor is earnedTest-PSBuildPester supports both majors and CI proves it on
every run. The psake floor was lower and untested: CI has exercised only 5.0.4 since #162 moved
the toolchain, so 4.9.0 asserted support that nothing verified. #120 already flagged exactly this
under Not yet specified.

That left two honest options — add a psake 4.x CI leg, or stop claiming 4.x. For a volunteer
project, maintaining a second task-runner matrix leg for a major nobody has asked for is the more
expensive one, and 1.0.0 is the cheapest moment to move a floor.

The principle is do not claim support you do not test — not "everything on latest", which would
also have raised the Pester floor that #120 deliberately kept low.

Two arguments deliberately not relied on

Recorded so this is not re-litigated on grounds that do not survive checking:

  • "One supported major simplifies psakeFile.ps1." Not today. There is no version-conditional
    psake code anywhere — IB.tasks.ps1 does not contain the string "psake", and psakeFile.ps1
    touches only $psake.context.currentTaskName and $psake.context.Peek().Tasks.Keys, both present
    in 4.9.x and 5.0.4 alike. The simplification is prospective.
  • "Nobody runs anything older than PowerShell 5.x." True, and already enforced by
    PowerShellVersion = '5.1' from chore: Raise minimum PowerShell version to 5.1 in module manifest #141. psake 4.9.1 runs perfectly well on PowerShell 7, so a
    consumer can be entirely current and still be on psake 4.

Known impact

RequiredModules is enforced at import, so this is not a graceful degradation — with only psake 4.x
installed, Import-Module PowerShellBuild fails outright.

One concrete consumer worth notifying rather than surprising: devblackops/Terminal-Icons pins
psake = '4.9.0'
in its requirements.psd1 and uses PowerShellBuild. Found by searching real
requirements.psd1 files rather than assuming.

What it costs them, per psake's own migration guide: most v4 build scripts work unchanged. The
Task ... -Depends syntax, -FromModule, and $psake.build_success are all explicitly retained —
this repository is the proof, since it still uses all three under 5.0.4.

Also fixed here

README.md claimed psake 4.8.0 was required and showed
Install-Module -Name psake -RequiredVersion 4.8.0, while the manifest floor had been 4.9.0.
Wrong before this change and more wrong after it, so it is corrected in the same pass — including
switching -RequiredVersion to -MinimumVersion, since the floor is a minimum.

Verification

  • Test-ModuleManifest validates against the raised floor
  • Full suite: 472 passed, 0 failed
  • Migration-guide entry added with the full list of psake v4→v5 breaks and what each costs a
    consumer, plus the one thing they gain: psake 5 stops silently swallowing an escaping break,
    which under 4.9.x hid twelve non-running tests in this repository (psake 5.x spike: assess breakage under psake 5.0.4 (clean bump, no extras) #155)

The second commit repairs doubled carriage returns my own edit introduced in CHANGELOG.md — a
nine-line addition was showing as a 736-line diff. Same mistake as 7db09e7, same cause.

tablackburn and others added 2 commits August 26, 2026 18:26
Closes #166. Part of #120 (Phase 3).

BREAKING CHANGE: psake 4.x is no longer supported. RequiredModules is
enforced at import, so a consumer with only psake 4.x installed cannot
import the module at all.

The floors this module declares were not all earned the same way. Pester's
floor sits below the version the build uses, and that is deliberate --
Test-PSBuildPester supports both majors and the #137 matrix proves it on
every run. The psake floor was lower AND untested: CI has exercised only
5.0.4 since #162 moved the toolchain, so 4.9.0 asserted support that
nothing verified. #120 already flagged that under "Not yet specified".

That left two honest options: add a psake 4.x CI leg, or stop claiming
4.x. For a volunteer project, maintaining a second task-runner matrix leg
for a major nobody has asked for is the more expensive one, and 1.0.0 is
the cheapest moment to move a floor.

Deliberately not relied on, because neither survives checking:

- "One supported major simplifies psakeFile.ps1" -- there is no
  version-conditional psake code anywhere today. IB.tasks.ps1 does not
  contain the string "psake", and psakeFile.ps1 touches only
  $psake.context.currentTaskName and $psake.context.Peek().Tasks.Keys,
  both present in 4.9.x and 5.0.4 alike.
- "Nobody runs anything older than PowerShell 5.x" -- true, and already
  enforced by PowerShellVersion = '5.1' from #141. psake 4.9.1 runs fine
  on PowerShell 7, so a consumer can be fully current and still on psake 4.

README.md was separately wrong and is fixed here: it claimed psake 4.8.0
was required while the manifest floor had been 4.9.0.

Suite: 472 passed, 0 failed. Test-ModuleManifest validates against the
raised floor.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012AKaM9i6NyMFDcJNeC34h5
Same defect as 7db09e7, same cause: the insert was built by joining lines
with CRLF and then converting newlines a second time, so every added line
ending became \r\r\n and git saw the whole file as rewritten.

Ten lines this time, turning a nine-line addition into a 736-line diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012AKaM9i6NyMFDcJNeC34h5
Copilot AI lite review requested due to automatic review settings August 26, 2026 22:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@tablackburn
tablackburn merged commit 8cb163c into main Aug 26, 2026
7 checks passed
@tablackburn
tablackburn deleted the feature/166-raise-psake-floor branch August 26, 2026 22:32
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.

Decide: raise the consumer psake floor to 5.x before 1.0.0

2 participants