Perl-Toolchain-Gang / CPAN-Meta

Specifications for CPAN distribution META files
36 stars 40 forks source link

add support for mixing and matching meta-spec version and serialization format #100

Closed karenetheridge closed 8 years ago

karenetheridge commented 9 years ago

This can be immediately used in Dist::Zilla::Plugin::MetaJSON, MetaYAML to remove the local serialization code, greatly simplifying its implementation.

I would suggest doing a stable release before merging this, so it can be released as its own trial without holding up the other changes that have already been released as a trial.

xdg commented 8 years ago

I don't see the value in adding the feature. Our original design goal was to have a hard separation between 1.4 and earlier (YAML) and 2 and later (JSON). The current design enforces that separation, making deviation difficult.

I'm open to argument, but "helps Dist::Zilla plugins" is not compelling.

karenetheridge commented 8 years ago

Can you elaborate more on " The current design enforces that separation, making deviation difficult."?

I'm happy to send a PR to Dist::Zilla instead, making it impossible to request a v2 META.yml, or a v1.4 META.json, if we decide that supporting those scenarios is undesirable, but I want to be clear on what the constraints are and why we might want to make that decision.

xdg commented 8 years ago

At a minimum, v2 should never be in a META.yml file because things that read META.yml may expect 1.4 format without checking (because there was never any reason to check before v2). I don't see any practical benefit to putting 1.4 spec data into a JSON file, as the only reason to have 1.4 is to be backwards compatible and the only place that backwards tools will look is META.yml.

karenetheridge commented 8 years ago

I'm happy to withdraw this PR as "we don't want to support this". However, the first two commits contain small test improvements, so they can be cherry-picked at your leisure.

xdg commented 8 years ago

Cherry picked the test commits to master (with some fixes)