Skip Menu |
 

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 85406
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: MAUKE [...] cpan.org
Cc: ribasushi [...] cpan.org
tsibley [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: 6.66
Fixed in: 6.67_04



Subject: can't figure out how to get "repository":{"url":..., "web":..., "type": ...} into META.json
Download (untitled) / with headers
text/plain 602b
According to https://metacpan.org/module/CPAN::Meta::Spec#resources there is a "repository" key with "url"/"web"/"type" subkeys. I can't figure out how to make EU:MM generate that. If it's just not possible, I'd consider that a problem with EU:MM. If it is possible, this is a documentation bug because as far as I can tell there's no documentation for it. I tried META_MERGE => { resources => { repository => { url => '...', web => '...', type => '...', }, }, }, but that seems to be silently ignored.
Download (untitled) / with headers
text/plain 790b
On Sat May 18 00:52:12 2013, MAUKE wrote: Show quoted text
> I tried > > META_MERGE => { > resources => { > repository => { > url => '...', > web => '...', > type => '...', > }, > }, > }, > > but that seems to be silently ignored.
I ran into a similar problem tonight with resources.bugtracker. The problem appears to be that ExtUtils::MM_Any generates a spec version 1.4 meta file by default. In that version of the spec, resources.repository and bugtracker are not a hashref but single URLs. It wasn't until version 2 of the meta spec that they became hashes. See https://metacpan.org/module/CPAN::Meta::History. To use the v2 form, also add: "meta-spec" => { version => 2 }, to your META_MERGE.
Subject: Re: [rt.cpan.org #85406] can't figure out how to get "repository":{"url":..., "web":..., "type": ...} into META.json
Date: Wed, 5 Jun 2013 22:17:51 +0100
To: Thomas Sibley via RT <bug-ExtUtils-MakeMaker [...] rt.cpan.org>
From: "Chris 'BinGOs' Williams" <chris [...] bingosnet.co.uk>
Download (untitled) / with headers
text/plain 1.1k
On Wed, May 29, 2013 at 01:36:40AM -0400, Thomas Sibley via RT wrote: Show quoted text
> Queue: ExtUtils-MakeMaker > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85406 > > > On Sat May 18 00:52:12 2013, MAUKE wrote:
> > I tried > > > > META_MERGE => { > > resources => { > > repository => { > > url => '...', > > web => '...', > > type => '...', > > }, > > }, > > }, > > > > but that seems to be silently ignored.
> > I ran into a similar problem tonight with resources.bugtracker. The problem appears to be that ExtUtils::MM_Any generates a spec version 1.4 meta file by default. In that version of the spec, resources.repository and bugtracker are not a hashref but single URLs. It wasn't until version 2 of the meta spec that they became hashes. See https://metacpan.org/module/CPAN::Meta::History. > > To use the v2 form, also add: > > "meta-spec" => { version => 2 }, > > to your META_MERGE.
I've documented this under META_MERGE in ExtUtils::MakeMaker documentation now. Many thanks, -- Chris Williams aka BinGOs PGP ID 0x4658671F http://www.gumbynet.org.uk ==========================
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 391b
On Wed May 29 01:36:39 2013, TSIBLEY wrote: Show quoted text
> > To use the v2 form, also add: > > "meta-spec" => { version => 2 }, > > to your META_MERGE.
That breaks everything. More specifically, I did that and found that the resulting MYMETA.{json,yml} files lacked all prerequisites, i.e. all of CONFIGURE_REQUIRES/BUILD_REQUIRES/TEST_REQUIRES/PREREQ_PM in my Makefile.PL were silently removed.
Download (untitled) / with headers
text/plain 690b
On Sat Jun 08 17:54:48 2013, MAUKE wrote: Show quoted text
> On Wed May 29 01:36:39 2013, TSIBLEY wrote:
> > > > To use the v2 form, also add: > > > > "meta-spec" => { version => 2 }, > > > > to your META_MERGE.
> > That breaks everything. More specifically, I did that and found that > the resulting MYMETA.{json,yml} files lacked all prerequisites, > i.e. all of > CONFIGURE_REQUIRES/BUILD_REQUIRES/TEST_REQUIRES/PREREQ_PM in my > Makefile.PL were silently removed.
I'm not sure what's going on but things are getting dropped by CPAN::Meta::Converter->convert (calling _convert). The code seems to be expecting a key called "prereqs" but it's getting "requires" instead, which it drops.
On Sat Jun 08 18:22:09 2013, MAUKE wrote: Show quoted text
> On Sat Jun 08 17:54:48 2013, MAUKE wrote:
> > On Wed May 29 01:36:39 2013, TSIBLEY wrote:
> > > > > > To use the v2 form, also add: > > > > > > "meta-spec" => { version => 2 }, > > > > > > to your META_MERGE.
> > > > That breaks everything. More specifically, I did that and found that > > the resulting MYMETA.{json,yml} files lacked all prerequisites, > > i.e. all of > > CONFIGURE_REQUIRES/BUILD_REQUIRES/TEST_REQUIRES/PREREQ_PM in my > > Makefile.PL were silently removed.
> > I'm not sure what's going on but things are getting dropped by > CPAN::Meta::Converter->convert (calling _convert). The code seems > to be expecting a key called "prereqs" but it's getting "requires" > instead, which it drops.
I found a workaround. In addition to 'META_MERGE => {'meta-spec' => {version => 2}}', I added the following to Makefile.PL: # Why? For the glory of satan, of course! { no warnings qw(redefine); *ExtUtils::MM_Any::_add_requirements_to_meta_v1_4 = \&ExtUtils::MM_Any::_add_requirements_to_meta_v2; } That seems to "fix" everything.
Subject: Re: [rt.cpan.org #85406] can't figure out how to get "repository":{"url":..., "web":..., "type": ...} into META.json
Date: Mon, 10 Jun 2013 20:26:37 +0100
To: Lukas Mai via RT <bug-ExtUtils-MakeMaker [...] rt.cpan.org>
From: "Chris 'BinGOs' Williams" <chris [...] bingosnet.co.uk>
Download (untitled) / with headers
text/plain 1.4k
On Sat, Jun 08, 2013 at 07:53:45PM -0400, Lukas Mai via RT wrote: Show quoted text
> Queue: ExtUtils-MakeMaker > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85406 > > > On Sat Jun 08 18:22:09 2013, MAUKE wrote:
> > On Sat Jun 08 17:54:48 2013, MAUKE wrote:
> > > On Wed May 29 01:36:39 2013, TSIBLEY wrote:
> > > > > > > > To use the v2 form, also add: > > > > > > > > "meta-spec" => { version => 2 }, > > > > > > > > to your META_MERGE.
> > > > > > That breaks everything. More specifically, I did that and found that > > > the resulting MYMETA.{json,yml} files lacked all prerequisites, > > > i.e. all of > > > CONFIGURE_REQUIRES/BUILD_REQUIRES/TEST_REQUIRES/PREREQ_PM in my > > > Makefile.PL were silently removed.
> > > > I'm not sure what's going on but things are getting dropped by > > CPAN::Meta::Converter->convert (calling _convert). The code seems > > to be expecting a key called "prereqs" but it's getting "requires" > > instead, which it drops.
> > I found a workaround. In addition to 'META_MERGE => {'meta-spec' => {version => 2}}', I added the following to Makefile.PL: > > # Why? For the glory of satan, of course! > { > no warnings qw(redefine); > *ExtUtils::MM_Any::_add_requirements_to_meta_v1_4 = \&ExtUtils::MM_Any::_add_requirements_to_meta_v2; > } > > That seems to "fix" everything.
v6.67_04 uploaded to CPAN which doesn't require this hackery. -- Chris Williams aka BinGOs PGP ID 0x4658671F http://www.gumbynet.org.uk ==========================
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.

This has been resolved by the 6.68 release. Many thanks.


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.