Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dist-Zilla CPAN distribution.

Report information
The Basics
Id: 72602
Status: open
Priority: 0/
Queue: Dist-Zilla

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 4.300003
Fixed in: (no value)



Subject: [PkgVersion] add generation of tests that checks module version
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
I'll think about it, at least. In the meantime, it's important to note that a Dist::Zilla::Dist::Builder object is not safe to re-use for more than one run through building.
On Tue Nov 22 01:27:08 2011, DOLMEN wrote: Show quoted text
> 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.
Dist::Zilla::Plugin::Test::CheckDeps does exactly what you describe.
ether: I don't think that Dist::Zilla::Plugin::Test::CheckDeps does what dolmen described. dolmen: what if, instead, there was an option to make the "package X already has a VERSION" fatal? I think I want to add that, anyway, for my own use. If I understood your report, it would solve this simply. -- rjbs
On 2013-07-25 16:16:32, RJBS wrote: Show quoted text
> dolmen: what if, instead, there was an option to make the "package X > already has a VERSION" fatal? I think I want to add that, anyway, for > my own use. If I understood your report, it would solve this simply.
I have added this in git as 3243646076c67d69e4149c0d14ed86b151557694 -- rjbs