[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Test::CPAN::Meta and friends



Hi Jonathan,

> I know you've been working hard on some important changes to
> Test::CPAN::Meta and friends. To summarize the three modules:
> 
> Test::CPAN::Meta - provides tests for META.yml & META.json based on
> Parse::CPAN::Meta (core as of perl 5.10.1)
> 
> Test::CPAN::Meta::YAML - provides tests for META.yml using a YAML
> parser (YAML or YAML::Syck) -- you also mention that this is intended
> to provide more complete validation of META.yml

Only in terms of YAML validation. Parse::CPAN::Meta being based on
YAML::Tiny, is much more specific to the requirements of YAML within
META.yml.

> Test::CPAN::Meta::JSON - provides tests for META.json using a JSON
> parser (the JSON module)

This is primarily to support CPAN Meta v2.0.

> As you might be aware, Debian currently has some packages for
> Test::CPAN::Meta (libtest-cpan-meta-perl) as well as Test::YAML::Meta
> (libtest-yaml-meta-perl), the latter of which has now been essentially
> renamed to Test::CPAN::Meta::YAML. The last package,
> Test::CPAN::Meta::JSON is not currently available as a Debian package.

I hadn't been aware, but thank you :)

> If I understand these three correctly, then there are some open
> questions that we will need to answer in order to move forward:
> 
> 1. Aside from being required by existing people depending on
> Test::YAML::Meta, are there substantial differences in the test output
> provided by Test::CPAN::Meta::YAML?

None. Currently they are just the old modules renamed.

> 2. You mentioned that the validation is supposed to be more complete,
> but is this currently the case?

All three distributions contain the code to validate all variants of the
spec. The only difference between them is what validation is used to
check the formatting of the META file.

The validation is more complete because the specification for the META
files has been more strictly defined. Older versions had a looser
interpretation of the specification.

> 3. Are there issues where something might pass according to
> Test::CPAN::Meta but fail according to Test::CPAN::Meta::YAML?

Yes. I can't remember what modules, but some have included META files
that would fail stricter YAML parsers, but for which Parse::CPAN::Meta
is more forgiving. There aren't many though.

> 4. Doesn't testing against something that is available to most users
> (Parse::CPAN::Meta) make the most sense?

Yes. However, the current spec prefers JSON, hence the release of
Test::CPAN::Meta::JSON (and it's predecessor). Because I released the
original Test::YAML::Meta before Parse::CPAN::Meta existed, I've kept it
going. I would prefer those that use it move to Test::CPAN::Meta.

This initial set of rereleases is just to change the names. However, the
intention in the long run is to remove the specification validation and
rely on CPAN::Meta, which will be core for future Perl releases. The
validation within CPAN::Meta is taken from my validation code in these
distributions anyway :)

> The current plan is to proceed thusly:
> 
> 1. Upgrade libtest-yaml-meta-perl as-is (this means it will become a
> wrapper around Test::CPAN::Meta::YAML, consistent with upstream)
> 
> 2. Create and upload Test::CPAN::Meta::YAML (as libtest-cpan-meta-yaml-perl)
> 
> 3. I suppose at some point we might also want Test::CPAN::Meta::JSON,
> but nothing in the archive currently requires it
> 
> With respect to #1 of this plan, there are only about 5 packages that
> depend on Test::YAML:;Meta, and another option for us would be to
> patch those packages to use Test::CPAN::Meta::YAML or
> Test::CPAN::Meta. Do you think this would be a good idea, or should we
> just do the same thing CPAN has, namely, the transition dummy
> "wrapper" package?

I would prefer authors to use Test::CPAN::Meta, but I have been told
(can't remember who unfortunately) by at least one author that they
prefer to use a fuller YAML parser.

As for a Debian packaged release it might make more sense to repackage
with Test::CPAN::Meta, but it might be worth suggesting to authors to do
that too.

If all dependencies on Test::YAML::Meta/Test::CPAN::Meta::YAML disappear
then I will be archive them both to BACKPAN.

Hope that gives you a little more insight behind the thoughts of the
distributions :)

Cheers,
Barbie.
-- 
Birmingham Perl Mongers <http://birmingham.pm.org>
Memoirs Of A Roadie <http://barbie.missbarbell.co.uk>
CPAN Testers Blog <http://blog.cpantesters.org>
YAPC Conference Surveys <http://yapc-surveys.org>
Ark Appreciation Pages <http://ark.eology.org>



Reply to: