-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails if Plack version == 1.0040 and CGI::Deurl::XS is not installed #3
Comments
Thank you @andk, I already received your smoker test reports and looked into the issue. I think it could be an issue with Dancer2 as it uses a private method of As for your workaround: I am using Dist::Zilla to generate the distribution. I need to look for a solution that will work with DZ. |
Yupp, sorry, I hadn't spotted that. For dzil this is quite similar in You would (1) NOT declare a dependency on Module::Versions::Report; (2) The idea is that the end user will not get noise unless they have Disadvantage of this is that you have to include it before the problem andreas |
I don't mind having a file with a I looked at your template and much of it, especially the comments, seem to include some amount of magic:-) Is the following the correct adaption of your code? # -*- mode: cperl -*-
use strict;
BEGIN {
my $exit_message = "";
unless (eval { require Module::Versions::Report; 1 }) {
$exit_message = "Module::Versions::Report not found";
}
if ($exit_message) {
$|=1;
print "1..0 # SKIP $exit_message\n";
eval "require POSIX; 1" and POSIX::_exit(0);
}
}
use Test::More tests => 1;
use Plack::Request; # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< only changed lines
use CGI::Deurl::XS; # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
diag(Module::Versions::Report->report);
pass;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# End: Do you know of any other module using this mechanism? Would you appreciate having a Dist::Zilla plugin providing such a test file? I'd rather write such a plugin than duplicating so much magic code and maintaining it at several places. |
Sorry for that:(
I don't think so. But maybe I'm missing something. Let me suggest to andreas |
Dancer2 folks seem to be fixing this. See PerlDancer/Dancer2#1154 (comment) Also I looked a for a Dist::Zilla based module that will report versions for the modules in question and found . Could you please inspect release 0.003_001? I don't remember which output formats analysis.cpantesters.org supported. I'd like to that a look into that code if you were as kind as pointing me to where that site's code is or (even better) where the modules versions are parsed. |
The link I gave above in the third entry on this page, shows my admitteldy clumsy attempt in Encode::MAB2. Since then I've written and released a substantially reduced approach: https://metacpan.org/source/ANDK/CPAN-Testers-ParseReport-0.3.0/t/00-load.t An early brainstorming discussion about the idea took place at dagolden/Test-DiagINC#1 The point is, we want everything that is influences the tests, not more, not less. Having only first level dependencies does not help if the culprit is in a second level dependency. Having only declared prerequisites does not help when the culprit is not declared. Having more than the actually involved modules may have the effect of sand in the eyes. We need the same amount of data for passing and failing reports because we have to focus on the differences. This issue here is a good example: we want a single test that reports both Plack's version and CGI::Deurl::XS's by educated sample code. Often, but not always, loading all of the modules in a "META.yaml/provides" section will do. If all this does not help, can you rephrase your question, maybe I misparse it (what did you find and what should I inspect?) |
I was trying to ask you to run the tests for version 0.003_001 and look into the test output if you can find the desired module versions in a parseable format. For example have a look at http://www.cpantesters.org/cpan/report/68361185. The modules listed in the issue's title are now listed in the test report. I guess only the output format is not yet supported as I don't see the module versions listed as a "regression" on analysis.cpantesters.org. From our conversion in Berlin I learned that only I as the module maintainer can compile the list of "interesting modules". We have that list and their versions now. I think the next step would be to support the format of |
Sorry, didn't understand the question, but now do. Answer below.
No output format supported besides Module::Versions::Report. M:V:R
The two links on this page that show examples, with line numbers: https://metacpan.org/source/ANDK/Encode-MAB2-0.09/t/00module_versions_report.t#L7 https://metacpan.org/source/ANDK/CPAN-Testers-ParseReport-0.3.0/t/00-load.t#L8 Especially the second one doesn't look so difficult to understand, no?.
Thanks,andreas |
I used Dist::Zilla::Plugin::Test::ReportPrereqs and won't change that any time soon.
It works.
I added a comment to the entry in the
The generated test file can be run by everyone and I feel perfectly comfortable with handling this with Dist::Zilla.
I think that is applicable. I ran a test and it reports the version or the absence of modules. |
As per subject.
Sample fail report:
http://www.cpantesters.org/cpan/report/67327196
I spotted the connection by chance on my smokers. Since you're running through a maze of optional dependencies I'd recommend the trick I'm using in some of my own Makefile.PLs: look up which optional dependenies are installed and declare those they are as prerequisites. This will not disturb the end user but will enrich the report and then analysis.cpantesters.org will automatically spot the connection that I expressed in the subject line
HTH&&Thanks,
The text was updated successfully, but these errors were encountered: