Closed splatteredbits closed 6 years ago
@Splatteredbits You are right. That change is noted in the release notes under "Breaking Changes".
The Pester 3 to 4 migration guide recommends the following:
replace all occurrences of any Contain assertion with FileContentMatch.
I haven't had to do that myself, but there's even a script in that guide to help automate that process.
My problem isn't that this changed, but that it changed between 4.0.6
and 4.0.7
.
As I understand it, 4.0.6 was marked with "-rc" which means it is pre-release per semver clause 9. That clause includes the following text:
...A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. ...
@splatteredbits It is our fault, partially. We cannot push pre-releases to PSGalllery, because it does not support it. We always talked about 4.0.0-rc
- 4.0.6-rc
as being release candidate, even though for PSGallery it was a released version. I also took time to share that 4.0.7
will have breaking changes on every major powershell channel to give people time to prepare their servers before the version with breaking changes hits them (or before version 4 hits them). I then waited at least two days, and posted reminders, and provided migration guide. That is as much as I could do.
Correctly the first released version would be 4.0.0
and the previous ones would be 4.0.0-rc1-6
, but psgallery does not support that :/
To help us out, please write an angry email to PSGallery people :) Or we can start publishing Ester - experimental Pester. Dibz on that name btw.
Now, when was explained why/when/what changed I assume that we can mark the issue as a "Waiting for closure". It will be closed after 7 days.
@Nohwnd @splatteredbits It looks like there is a draft RFC for the PowerShell gallery limitation.. It looks like the place for feedback is the associated issue.
@it-praktyk I think this sort of issue should probably be marked with "Resolution-External" similar to the way that tag gets used on other projects like PowerShell/PowerShell.
Hmm. I would prefer, then, that you not publish prerelease versions to the Gallery until it supports prerelease versions. I use the gallery too, and don't like how it doesn't support them. Use nuget.org or publish to GitHub. Maybe someone needs to write a GitHub provider.
I understand your concerns. In the next few days (?), we start a discussion about maintenance model of Pester. Your issue will also be dealt with.
It looks like PowerShell Gallery may soon have pre-release semantics. I have opened #889 to pursue that solution. Assuming pre-release semantics comes to fruition we should be able to avoid this problem in the future.
@splatteredbits Thanks for opening this issue. I think it has precipitated some real progress.
Now, when pre-release versions are supported by PowerShell Gallery and Pester is published in this mode too, I assume that we can close the issue.
Just upgraded to Pester 4.0.7 (from 4.0.6) and it looks like the
Contain
operator is gone:results in this failure: