* Michael G Schwern <schw...@pobox.com> [2009-05-17T20:59:08]
> Ricardo SIGNES wrote:
> > Those of you who were at Birmingham heard me go on and on about my burning
> > desire to replace the use of YAML in CPAN dist metadata with JSON.  I'd be
> > happy to review the reasons, but for now I'll take it for granted that we
> > all know them and agree.  That certainly seemed to be the case amongst the
> > crowd at QA09.
> 
> I remain the loyal opposition.  Not as fiercely as with TAP, since META.json
> is intended more for machines than TAP is and so the benefits do not so
> clearly outweigh the complexity of parsing YAML.

Right now, there is more or less an unspoken mandate that the YAML in META.yml
must be parseable by YAML::Tiny, meaning it has *no* feature benefits over
JSON.  It's just a little easier for humans to read.  Seriously, though, just a
little, itty-bitty bit.  q.v.,

  http://cpansearch.perl.org/src/RJBS/Dist-Zilla-1.091370/META.json

There is no documented, proven YAML implementation in Perl.  I think that
YAML::XS seems to work pretty well, but requires XS.  The port of PyYAML still
hasn't landed -- which is what you said we'd have any day now when you were
arguing for YAML in TAP -- in Oslo in early 2008.

The YAML parser and emitter would need to be in core to support CPAN build and
install tools.

Why are you still pushing, even a little, for anyone to *keep* making META.yml
in the future?  Are there arguments that I'm not seeing or appreciating?

> > Today I updated my proof of concept (and/or civil disobedience dist)
> > JSON-Meta-CPAN, which makes all the three common build tools (Module::Build,
> > Module::Install, and ExtUtils::MakeMaker) optionally produce JSON instead of
> > YAML.  With the new version, dists will not produce a META.yml, but will
> > *instead* produce a META.json.  I have also updated my own build system,
> > Dist::Zilla, to do the same when asked.
> 
> I'll take a patch to MakeMaker to do that on demand.

Once CPAN, CPANPLUS, and PAUSE support JSON, I hope you will consider a patch
to do it by default.

> I would prefer to still able to produce META.yml but I understand not wanting
> to saddle parsers with having to deal with two protocols.  I suppose there's
> nothing stopping me from spitting out both.

I don't care if both are produced, as long as the rule is "tools should prefer
JSON if both are present and your tool can parse JSON."  Well, I do care, but
not very much.

-- 
rjbs

Reply via email to