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
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1184
Download (untitled) / with headers
text/plain 1.1k
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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6890-1323750043-985.72602-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 174
Download (untitled) / with headers
text/plain 174b
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-17364-1328141908-1461.72602-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 330
Download (untitled) / with headers
text/plain 330b
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.14-3184-1374783392-1380.72602-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 312
Download (untitled) / with headers
text/plain 312b
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
MIME-Version: 1.0
In-Reply-To: <rt-4.0.14-3184-1374783392-1380.72602-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.14-3184-1374783392-1380.72602-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.14-3186-1374783604-123.72602-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 331
Download (untitled) / with headers
text/plain 331b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.