Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Meta CPAN distribution.

Report information
The Basics
Id: 82860
Status: open
Priority: 0/
Queue: CPAN-Meta

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

Bug Information
Severity: Normal
Broken in: 2.120921
Fixed in: (no value)



Subject: downgrade_optional_features causes illegal internat structures
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
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 2820
Download (untitled) / with headers
text/plain 2.7k
When the original YAML looks like optional_features: opt_csv: description: Provides parsing of CSV streams requires: Text::CSV_XS: 0.69 recommends: Text::CSV: 1.21 Text::CSV_PP: 1.29 Text::CSV_XS: 0.95 opt_excel: description: Provides parsing of Microsoft Excel files requires: Spreadsheet::ParseExcel: 0.26 Spreadsheet::ParseExcel::FmtDefault: 0 recommends: Spreadsheet::ParseExcel: 0.59 ⋮ The internal structure will look like { opt_csv => { description => 'Provides parsing of CSV streams', x_recommends => { 'Text::CSV' => '1.21', 'Text::CSV_PP' => '1.29', 'Text::CSV_XS' => '0.95' }, x_requires => { 'Text::CSV_XS' => '0.69' } }, opt_excel => { description => 'Provides parsing of Microsoft Excel files', x_recommends => { 'Spreadsheet::ParseExcel' => '0.59' }, x_requires => { 'Spreadsheet::ParseExcel' => '0.26', 'Spreadsheet::ParseExcel::FmtDefault' => 0 } }, ⋮ Passing the complete meta structure through my $yml = CPAN::Meta::Converter->new ($jsn)->convert (version => "1.4"); will now cause several errors like Odd number of elements in anonymous hash at /pro/lib/perl5/ site_perl/5.16.0/CPAN/Meta/Converter.pm line 462. followed by Failed to downconvert metadata to 1.4. Errors: Expected a map structure from string or file. (optional_features -> opt_csv -> build_requires) [Validation: 1.4] Expected a map structure from string or file. (optional_features -> opt_csv -> requires) [Validation: 1.4] Expected a map structure from string or file. (optional_features -> opt_excel -> build_requires) [Validation: 1.4] Expected a map structure from string or file. (optional_features -> opt_excel -> requires) [Validation: 1.4] ⋮ Caused in function _downgrade_optional_features by $features->{$name} = { description => $origin->{$name}{description}, requires => _extract_prereqs($origin->{$name} {prereqs},'runtime','requires'), configure_requires => _extract_prereqs($origin->{$name} {prereqs},'runtime','configure_requires'), build_requires => _extract_prereqs($origin->{$name} {prereqs},'runtime','build_requires'), recommends => _extract_prereqs($origin->{$name} {prereqs},'runtime','recommends'), conflicts => _extract_prereqs($origin->{$name} {prereqs},'runtime','conflicts'), }; resulting in _extract_prereqs () returning empty lists causing illegal initialisation
From david [...] autopragmatic.com Mon Jan 21 14: 49:33 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.691 tagged_above=-99.9 required=10 tests=[AWL=0.209, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-1971-1358784141-1609.82860-4-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-82860 [...] rt.cpan.org> <rt-3.8.HEAD-1971-1358784141-1609.82860-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.49.127.238 with SMTP id nj14mr24029436qeb.9.1358797764628; Mon, 21 Jan 2013 11:49:24 -0800 (PST)
Message-ID: <CAOeq1c_chVYsR6zAq049w89LMiBOwK9ss8O=0Tn2Mif5znjtqQ [...] mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.691
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] autopragmatic.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 1121C240416 for <cpan-bug+CPAN-Meta [...] hipster.bestpractical.com>; Mon, 21 Jan 2013 14:49:33 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UIZ4SH3+rsbJ for <cpan-bug+CPAN-Meta [...] hipster.bestpractical.com>; Mon, 21 Jan 2013 14:49:31 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 02ECE2402E2 for <bug-CPAN-Meta [...] rt.cpan.org>; Mon, 21 Jan 2013 14:49:30 -0500 (EST)
Received: (qmail 21146 invoked by uid 103); 21 Jan 2013 19:49:30 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 21 Jan 2013 19:49:30 -0000
Received: from mail-qc0-f171.google.com (HELO mail-qc0-f171.google.com) (209.85.216.171) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Mon, 21 Jan 2013 11:49:27 -0800
Received: by mail-qc0-f171.google.com with SMTP id d1so491859qca.30 for <bug-CPAN-Meta [...] rt.cpan.org>; Mon, 21 Jan 2013 11:49:24 -0800 (PST)
Received: by 10.49.118.200 with HTTP; Mon, 21 Jan 2013 11:48:53 -0800 (PST)
Delivered-To: cpan-bug+CPAN-Meta [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #82860] downgrade_optional_features causes illegal internat structures
Return-Path: <david [...] autopragmatic.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autopragmatic.com; s=google; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=WI3mneWiwfxDYwOSFyyynqbHzkdkSu2ZhM1JaGqAyiA=; b=ZGihkMyOgKfiutU2CgXfvhcWiY3tO53UZjII5dNrwj6so87PilpcW5LSoOVCwmlWBc dUw7ioaHo17qdQLM23Xc8tZBMyU6uhjBGErxcAh/Ke6ttB9vgPIImqhwE9dyiy2fHGKE xJ0A6RKhHDuCniY5NvTmY9koSbzgVcyQ67IEc=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+CPAN-Meta [...] hipster.bestpractical.com
X-RT-Mail-Extension: cpan-meta
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=WI3mneWiwfxDYwOSFyyynqbHzkdkSu2ZhM1JaGqAyiA=; b=QfsL5mudYaSUwY9wTvmYwheCTspHFU7F11c9bF2RRP4Vk8Pj7HMEpJzZ2RNfS3Xlee BC/x5gqhhkQoHKQFQ1u74SVqCoDQL0iogzdmC+TyVnSrHNo5tHIwT9473f9bLuC16kSt irDW/14NbQ1RCmMIjVQOtfNLbScwBDNU37iMqDMFA3v8R99t8av3HOrCSdKZgxaNpUDb wtDEmRoXnt8jSJvxXNtOUS9OO7Qpv0Oqdy8eg+x8DKF1oSX/TBgokPLX9nRa8iQ7X8VU MdpZJpv2pp5Rj6DwfjNSBYXnbD16OOss4GJSgWVnwe8brmJLzzygr2w1kccssjE8x8L2 Rllw==
X-Google-Sender-Auth: D7FZj2vios4lx6EZwsiJA8eNDgA
Sender: david [...] autopragmatic.com
Date: Mon, 21 Jan 2013 14:48:53 -0500
X-Spam-Level:
To: bug-CPAN-Meta [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
X-GM-Message-State: ALoCoQl3sMUeVAVlpuUBiPM4rSYixEk4A8NvVXduDNhVP9pCMlRAM7UC3OXOdj/Pqn0qBg2VCZ6o
RT-Message-ID: <rt-3.8.HEAD-19215-1358797773-1720.82860-0-0 [...] rt.cpan.org>
Content-Length: 225
Download (untitled) / with headers
text/plain 225b
As discussed on IRC, the input data structure of optional_features is not proper v2 format, so it's getting munged into "x_" format and then can't round trip. That said, the errors look like bugs and we should address that.


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.