Closed karenetheridge closed 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.
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.
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.
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.
Cherry picked the test commits to master (with some fixes)
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.