Skip Menu |

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

Report information
The Basics
Id: 81061
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-Git

People
Owner: Nobody in particular
Requestors: shmuelfomberg [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 2.002



Subject: [Git::NextVersion] Bumping version from 0 to 1
for some reason, Git::NextVersion insists on bumping the version to 1, and I have to always declare the version with V=0.007 Current git tags: v0.001 v0.002 v0.003 v0.004 v0.005 v0.006 in dist.ini, the plugin is declared without any parameter. Thanks.
I was going to ask for a pointer to your Git repo, but when I tried building one of my dists (HTML-Tree) that uses Git::NextVersion, it did the same thing. The problem seems to be parsing the existing versions. When I added some debug logging, it reported every existing version was 0. I found a solution. Find the bit in Dist::Zilla::Plugin::Git::NextVersion that says 'version->parse($1)' and change that to 'version->parse("$1")'. Please try that and see if it fixes it for you, too. What I can't figure out is why the tests pass. Despite failing every time I try to build my dist, the tests work just fine.
Thanks, that fixed it for me. Good luck fixing the tests! :-) Shmuel.
It's actually a bug in version->parse: https://rt.perl.org/rt3/Public/Bug/Display.html?id=115660 Basically, passing $1 to version->parse may or may not work, depending on what the rest of your program has been doing with $1. Unfortunately, loading Test::More tends to keep the bug from triggering. Matthew Horsfall discovered that adding "local $1;" in the right spot in the test will consistently trigger the bug, but only after I'd released 2.002. The improved test will be in the next release.
On Mon Nov 12 15:18:18 2012, CJM wrote: Show quoted text
> It's actually a bug in version->parse: > https://rt.perl.org/rt3/Public/Bug/Display.html?id=115660 > > Basically, passing $1 to version->parse may or may not work, depending > on what the rest of your program has been doing with $1. Unfortunately, > loading Test::More tends to keep the bug from triggering. > > Matthew Horsfall discovered that adding "local $1;" in the right spot in > the test will consistently trigger the bug, but only after I'd released > 2.002. The improved test will be in the next release.
Thanks for the release. I don't think that you really need to bother testing that, as it is a known bug in Perl and surely will be closed soon. I wouldn't have. :-) About the but in the parse function - magic variables are really annoying to handle in XS. and you can never be sure where they will be injected from...