cpan-testers / cpantesters-api

An API in to data held by CPAN Testers: Test reports and CPAN uploads
Other
4 stars 4 forks source link

CONTRIBUTING.md is misleading as to prerequisites #36

Open jkeenan opened 6 years ago

jkeenan commented 6 years ago

According to CONTRIBUTING.md,

Once you have installed Dist::Zilla via cpanm Dist::Zilla, you can get this distributions's dependencies by doing: dzil listdeps --author --missing | cpanm. Once all that is done, testing is as easy as: dzil test.

I followed these instructions. After doing dzil listdeps --author --missing | cpanm, I followed the terminal instruction to invoke: dzil authordeps --missing | cpanm.

While that installed many CPAN modules, I suspected it was not complete. So, prompted by the README.md and some issues, I also invoked:

cpanm Mojolicious Mojolicious::Plugin::OpenAPI CPAN::Testers::Schema \
    DateTime::Format::SQLite DBIx::Class::EasyFixture

I figured that at that point I was ready, per CONTRIBUTING.md, to run dzil test. However, when I did so, I got massive test failures. (See attachment 'dzil-test-failures-20180813.txt'.) dzil-test-failures-20180813.txt

Apart from the fact that dzil apparently didn't know to install these:

Warning: prerequisite Alien::SwaggerUI 0 not found.
Warning: prerequisite Beam::Minion 0.007 not found.
...
Warning: prerequisite Log::Any::Adapter::MojoLog 0.02 not found.
Warning: prerequisite Mercury 0.015 not found.
Warning: prerequisite Minion::Backend::mysql 0.12 not found.
Warning: prerequisite Mock::MonkeyPatch 0 not found.

... what is really puzzling is this:

Warning: prerequisite CPAN::Testers::Schema 0.023 not found. We have 0.022.

... given that I just used cpanm to install CPAN::Testers::Schema!

Please advise as to how I should proceed.

Thank you very much. Jim Keenan

jkeenan commented 6 years ago

I next used cpanm as follows:

cpanm Alien::SwaggerUI Beam::Minion Log::Any::Adapter::MojoLog \
    Mercury Minion::Backend::mysql Mock::MonkeyPatch \
    CPAN::Testers::Schema

Most of these modules installed successfully, but, once again, no version 0.023 of CPAN::Testers::Schema could be found or installed. (0.022 is the highest version listed on metacpan.org.) I then called dzil test once again but still got test failures. Please see the second attachment .

dzil-test-failures-20180813-02.txt

Please advise.

Thank you very much. Jim Keenan

preaction commented 6 years ago

I've release CPAN-Testers-Schema v0.023. It was on the git repo only. The test failures that you're seeing look to be related to the new features added in that version. I'm not sure why dzil listdeps --missing didn't list the dependencies correctly, but I do think that the CONTRIBUTING doc could explain the authordeps/listdeps thing more clearly, so I'll do that now.

You should be able to install CPAN::Testers::Schema v0.023 from CPAN in a few minutes, once the mirrors are synced up. Otherwise, you could install it from the git repo using either cpanm . or dzil install (after installing the authordeps for that repo, which should be the same as this repo, with dzil authordeps --missing | cpanm).

jkeenan commented 6 years ago

Thanks for looking into this. The CPAN release of CPAN::Testers::Schema v0.023 enabled me to call dzil test and get all tests to PASS. This puts me in a position to play with the cpantesters-api codebase, explore issues, make pull requests and so forth. (I consider everything Perl-related on github.com to be development code, so I would never install code from one github repo simply to serve as a prerequisite to doing development work on a second github repo.)

However, that doesn't clear up this issue completely. There's still the question as to why dzil did not recognize that it had to install several other CPAN modules:

Warning: prerequisite Alien::SwaggerUI 0 not found.
Warning: prerequisite Beam::Minion 0.007 not found.
...
Warning: prerequisite Log::Any::Adapter::MojoLog 0.02 not found.
Warning: prerequisite Mercury 0.015 not found.
Warning: prerequisite Minion::Backend::mysql 0.12 not found.
Warning: prerequisite Mock::MonkeyPatch 0 not found.

Does anyone have insight into that?

Thank you very much. Jim Keenan

preaction commented 6 years ago

I'm not sure why dzil listdeps --missing didn't list the dependencies correctly the second time. The instructions in the CONTRIBUTING.md are wrong: You need to install the author dependencies before listdeps will even work (hence the error you got). So the instructions should be:

cpanm Dist::Zilla
dzil authordeps --missing | cpanm
dzil listdeps --missing | cpanm