Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 84359
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-NextVersion-Semantic

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

Bug Information
Severity: (no value)
Broken in: 0.1.0
Fixed in: (no value)



Subject: PreviousVersionProvider not being loaded
I have just installed the Dist-Zilla-Plugin-NextVersion-Semantic plugin with a view to using Semantic Versioning for a new project. # dist.ini [NextVersion::Semantic] # Changes Revision history for A-New-Project {{$NEXT}} - MINOR: initial release 0.1.0 2013-04-02 - non-existent release with version number for incrementing purposes $ dzil build [DZ] beginning to build A-New-Project [NextVersion::Semantic] no previous version found [NextVersion::Semantic] no previous version found at ... I have determined that this distribution comes with a previous version provider, but it is not outputting any error messages. I note this line in the default sub for the previous_version attribute in Semantic.pm: my $plugins = $self->zilla->plugins_with('-YANICK::PreviousVersionProvider'); I added a YAML Dump call underneath that to inspect what's returned, then ran "dzil build" again: $ dzil build [DZ] beginning to build A-New-Project --- [] [NextVersion::Semantic] no previous version found [NextVersion::Semantic] no previous version found at ... It appears that plugins_with() is returning an empty list reference. Semantic.pm would abort if a non-reference were returned, and it seems that it should also fail when an empty reference is returned. However, the following line: $self->log_fatal( "at least one plugin with the role PreviousVersionProvider is required" ) unless ref $plugins; does not take empty references into account. So it seems that there are two problems: 1. default sub for previous_version attribute not correctly detecting zero PreviousVersionProvider plugins being found; 2. bundled PreviousVersionProvider not being found. I am working around this at the moment for testing purposes by manually providing a version number: $ V=1.0.0 dzil build
On Tue Apr 02 17:16:43 2013, LXP wrote: Show quoted text
> So it seems that there are two problems: > > 1. default sub for previous_version attribute not correctly detecting > zero PreviousVersionProvider plugins being found; > 2. bundled PreviousVersionProvider not being found.
A test and patch for #1 has been provided in a GitHub pull request: https://github.com/yanick/Dist-Zilla-Plugin-NextVersion-Semantic/pull/1 #2 was due to me not correctly reading the documentation and also misinterpreting the intended error message in #1. The above GitHub pull request also includes a small change to the error message and a small documentation patch to hopefully make some things more obvious.
Fix merged and new version on its way to CPAN. Thanks!