Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PkgVersion] add generation of tests that checks module version [rt.cpan.org #72602] #679

Open
rjbs opened this issue Jul 3, 2021 · 0 comments

Comments

@rjbs
Copy link
Owner

rjbs commented Jul 3, 2021

https://rt.cpan.org/Ticket/Display.html?id=72602

It would be safer if PkgVersion would generate a release test that would
check that the version in each module is really the version that was
expected, to check that PkgVersion did its job before the release.
A suggested implementation would be to compare the versions in
Changes/META.{json,yml}/*.pm. 
I think it is really important to not make this added test as a separate
plugin that would have to be explicitely loaded by the user but instead
to include it for every PkgVersion usage: every code generator must have
its safeguard.


My use case for this wish is that I've been able to generate a broken
release due to PkgVersion (and maybe multiple calls to it, due to
running multiple builds from Dist::Zilla::Shell):
https://metacpan.org/source/DOLMEN/Dist-Zilla-Plugin-Version-FromSubversion-1.000002/lib/Dist/Zilla/Plugin/Version/FromSubversion.pm
In this package there is 3 PkgVersion-generated blocks, with 2 different
versions. As the CPAN toolchain usually uses the first $VERSION line
from a package while Perl takes the last line, there is a mismatch
between what the tools will use and what Perl will see at runtime.

-- 
Olivier Mengué - http://perlresume.org/DOLMEN
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

No branches or pull requests

1 participant