feat!: Raise the consumer psake floor to 5.0.4 - #181
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #166. Part of #120 (Phase 3).
Breaking.
RequiredModulesnow requires psake 5.0.4 or newer, previously4.9.0. psake4.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:
4.9.0→ 5.0.4Pester's lower floor is earned —
Test-PSBuildPestersupports both majors and CI proves it onevery run. The psake floor was lower and untested: CI has exercised only 5.0.4 since #162 moved
the toolchain, so
4.9.0asserted support that nothing verified. #120 already flagged exactly thisunder 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:
psakeFile.ps1." Not today. There is no version-conditionalpsake code anywhere —
IB.tasks.ps1does not contain the string "psake", andpsakeFile.ps1touches only
$psake.context.currentTaskNameand$psake.context.Peek().Tasks.Keys, both presentin 4.9.x and 5.0.4 alike. The simplification is prospective.
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 aconsumer can be entirely current and still be on psake 4.
Known impact
RequiredModulesis enforced at import, so this is not a graceful degradation — with only psake 4.xinstalled,
Import-Module PowerShellBuildfails outright.One concrete consumer worth notifying rather than surprising:
devblackops/Terminal-Iconspinspsake = '4.9.0'in itsrequirements.psd1and uses PowerShellBuild. Found by searching realrequirements.psd1files rather than assuming.What it costs them, per psake's own migration guide: most v4 build scripts work unchanged. The
Task ... -Dependssyntax,-FromModule, and$psake.build_successare all explicitly retained —this repository is the proof, since it still uses all three under 5.0.4.
Also fixed here
README.mdclaimed psake 4.8.0 was required and showedInstall-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
-RequiredVersionto-MinimumVersion, since the floor is a minimum.Verification
Test-ModuleManifestvalidates against the raised floorconsumer, 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— anine-line addition was showing as a 736-line diff. Same mistake as
7db09e7, same cause.