Fields, Christopher J | 17 Oct 2011 05:08
Favicon
Gravatar

Possible bug?

All,

I have been attempting to push a release to CPAN for a few bioperl sub-distributions and ran into an odd issue
where the distribution was not being indexed in CPAN, documented here:

http://www.nntp.perl.org/group/perl.modules/2011/10/msg78021.html

This appears to be due to the version for the modules being set to '0' in META.yml/json instead of not being
defined (yes, we know this is a problem with the bioperl code, but Andreas indicated that lack of a module
version probably should not default to '0'.  Any reason this is occurring?

chris
Leon Timmermans | 18 Oct 2011 09:39
Picon
Gravatar

Re: Possible bug?

On Mon, Oct 17, 2011 at 5:08 AM, Fields, Christopher J
<cjfields <at> illinois.edu> wrote:
> This appears to be due to the version for the modules being set to '0' in META.yml/json instead of not being
defined (yes, we know this is a problem with the bioperl code, but Andreas indicated that lack of a module
version probably should not default to '0'.  Any reason this is occurring?

Meta 2.0 is quite clear it should be absent if no version is detected.
Actually that is what Module::Build appears to be trying to do, I'm
not sure why it fails.

Leon

David Golden | 18 Oct 2011 15:29
Picon
Gravatar

Re: Possible bug?

On Oct 18, 2011 3:39 AM, "Leon Timmermans" <fawaka <at> gmail.com> wrote:
>
> On Mon, Oct 17, 2011 at 5:08 AM, Fields, Christopher J
> <cjfields <at> illinois.edu> wrote:
> > This appears to be due to the version for the modules being set to '0'
in META.yml/json instead of not being defined (yes, we know this is a
problem with the bioperl code, but Andreas indicated that lack of a module
version probably should not default to '0'.  Any reason this is occurring?
>
> Meta 2.0 is quite clear it should be absent if no version is detected.
> Actually that is what Module::Build appears to be trying to do, I'm
> not sure why it fails.

Could we please get a minimal test case that demonstrates the error?

Or even just a repo URL for the code in question?

Thanks,

David
Fields, Christopher J | 18 Oct 2011 15:36
Favicon
Gravatar

Re: Possible bug?

On Oct 18, 2011, at 8:29 AM, David Golden wrote:

> 
> On Oct 18, 2011 3:39 AM, "Leon Timmermans" <fawaka <at> gmail.com> wrote:
> >
> > On Mon, Oct 17, 2011 at 5:08 AM, Fields, Christopher J
> > <cjfields <at> illinois.edu> wrote:
> > > This appears to be due to the version for the modules being set to '0' in META.yml/json instead of not
being defined (yes, we know this is a problem with the bioperl code, but Andreas indicated that lack of a
module version probably should not default to '0'.  Any reason this is occurring?
> >
> > Meta 2.0 is quite clear it should be absent if no version is detected.
> > Actually that is what Module::Build appears to be trying to do, I'm
> > not sure why it fails.
> 
> Could we please get a minimal test case that demonstrates the error?
> 
> Or even just a repo URL for the code in question?

https://github.com/bioperl/bioperl-network

I can work on a minimal test case.  If needed I can also fork the specific github code and try to weed out the problem.

> Thanks,
> 
> David

chris
David Golden | 18 Oct 2011 18:23
Picon
Gravatar

Re: Possible bug?

On Tue, Oct 18, 2011 at 9:36 AM, Fields, Christopher J
<cjfields <at> illinois.edu> wrote:
> https://github.com/bioperl/bioperl-network
>
> I can work on a minimal test case.  If needed I can also fork the specific github code and try to weed out the problem.

No need to do the test case.  I was able to load the bioperl
dependency chain and see it directly.  :-)

I have two reactions:

(a) Module::Build is doing it wrong -- in that it will "normalize" an
undefined version to "0" and leave it in.  The CPAN::Meta::Spec v2
says that the version metadata should only exist if a $VERSION string
exists, but Module::Build does not produce v2 metadata and the v1.4
spec doesn't say anything about the subkeys of "provides".

(b) PAUSE is being too nitpicky.  An undefined $VERSION is effectively
treated as a "0" in code, so it doesn't really matter too much if the
metadata says "0" or omits the key.

Nevertheless, in a battle between M::B and PAUSE, clearly PAUSE should
win.  (I get to wear both hats: I'm PAUSE admin *and* M::B
co/ex-maintainer, so I'm indifferent.)

I'll commit a fix to the repo and if/when a new M::B maintainer
volunteers (or I'm forced by p5p to do another release), then it will
go live.

I do encourage adding $VERSION to the bioperl code (it looks like
(Continue reading)

Fields, Christopher J | 18 Oct 2011 20:40
Favicon
Gravatar

Re: Possible bug?

On Oct 18, 2011, at 11:23 AM, David Golden wrote:

> On Tue, Oct 18, 2011 at 9:36 AM, Fields, Christopher J
> <cjfields <at> illinois.edu> wrote:
>> https://github.com/bioperl/bioperl-network
>> 
>> I can work on a minimal test case.  If needed I can also fork the specific github code and try to weed out the problem.
> 
> No need to do the test case.  I was able to load the bioperl
> dependency chain and see it directly.  :-)
> 
> I have two reactions:
> 
> (a) Module::Build is doing it wrong -- in that it will "normalize" an
> undefined version to "0" and leave it in.  The CPAN::Meta::Spec v2
> says that the version metadata should only exist if a $VERSION string
> exists, but Module::Build does not produce v2 metadata and the v1.4
> spec doesn't say anything about the subkeys of "provides".
> 
> (b) PAUSE is being too nitpicky.  An undefined $VERSION is effectively
> treated as a "0" in code, so it doesn't really matter too much if the
> metadata says "0" or omits the key.
> 
> Nevertheless, in a battle between M::B and PAUSE, clearly PAUSE should
> win.  (I get to wear both hats: I'm PAUSE admin *and* M::B
> co/ex-maintainer, so I'm indifferent.)

Andreas fixed this for PAUSE and the dist successfully reindexed, but it's definitely worth fixing in M::B
as well (the indexing issue was raised on modules <at> perl as well).

(Continue reading)


Gmane