Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more lax about resources Meta type #354

Closed
rwstauner opened this issue Oct 27, 2014 · 9 comments
Closed

Be more lax about resources Meta type #354

rwstauner opened this issue Oct 27, 2014 · 9 comments

Comments

@rwstauner
Copy link
Contributor

Attribute (resources) does not pass the type constraint because: Validation failed for 'MetaCPAN::Types::Internal::Resources' with value { bugtracker: { web: "http://github.com/szabgab/Time-Warp" }, repository: { type: "git", url: "http://github.com/szabgab/Time-Warp.git", web: "http://github.com/szabgab/Time-Warp", x_license: "http://dev.perl.org/licenses/" } } at reader MetaCPAN::Document::Release::resources (defined at /home/metacpan/carton/metacpan-api/lib/perl5/x86_64-linux/Moose/Exporter.pm line 409) line 14.
MetaCPAN::Document::Release::resources('MetaCPAN::Document::Release=HASH(0x84a0e98)') called at /home/metacpan/metacpan-api/bin/../lib/MetaCPAN/Script/Tickets.pm line 113
MetaCPAN::Script::Tickets::retrieve_github_bugs('MetaCPAN::Script::Tickets=HASH(0x51fb2b8)') called at /home/metacpan/metacpan-api/bin/../lib/MetaCPAN/Script/Tickets.pm line 80
MetaCPAN::Script::Tickets::run('MetaCPAN::Script::Tickets=HASH(0x51fb2b8)') called at /home/metacpan/carton/metacpan-api/lib/perl5/x86_64-linux/Class/MOP/Method/Wrapped.pm line 50
Class::MOP::Method::Wrapped::__ANON__('MetaCPAN::Script::Tickets=HASH(0x51fb2b8)') called at /home/metacpan/carton/metacpan-api/lib/perl5/x86_64-linux/Class/MOP/Method/Wrapped.pm line 91
MetaCPAN::Script::Tickets::run('MetaCPAN::Script::Tickets=HASH(0x51fb2b8)') called at /home/metacpan/metacpan-api/bin/../lib/MetaCPAN/Script/Runner.pm line 32
MetaCPAN::Script::Runner::run('MetaCPAN::Script::Runner') called at bin/metacpan line 21

Does this error stop the whole process, or just skip this doc?

https://github.com/CPAN-API/cpan-api/blob/master/lib/MetaCPAN/Types/Internal.pm#L115

Looks like our "type" doesn't allow x_ extensions.
Should we remove keys matching qr{\Ax_}i in the coercion?

@tsibley
Copy link
Contributor

tsibley commented Oct 27, 2014

Looks like a fatal error to me, so that stops the tickets updater from running to completion.

@tsibley
Copy link
Contributor

tsibley commented Oct 27, 2014

The type constraint should likely allow other keys/values there, and simply validate values for any of the standard keys we constrain on.

@tsibley
Copy link
Contributor

tsibley commented Oct 27, 2014

That is, it should be extended to use the slurpy function appropriately: https://metacpan.org/pod/MooseX::Types::Structured#slurpy

@ranguard
Copy link
Member

ranguard commented Nov 2, 2014

Can someone patch this please, I'm about to setup a 3rd server, so we'll be getting 3 of these emails a day!

@oalders
Copy link
Member

oalders commented Nov 2, 2014

I'll do it this evening.

@tsibley
Copy link
Contributor

tsibley commented Nov 3, 2014

Er, I wasn't recommending MooseX::SlurpyConstructor. See the link to MooseX::Types::Structured above.

@ranguard
Copy link
Member

@oalders is this done?

@oalders
Copy link
Member

oalders commented Nov 13, 2014

Not correctly.

@ranguard
Copy link
Member

ranguard commented Mar 5, 2016

Done enough that we've not mentioned it again - closing

@ranguard ranguard closed this as completed Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants