Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-ModuleBuildTiny-Fallback CPAN distribution.

Report information
The Basics
Id: 120424
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-ModuleBuildTiny-Fallback

People
Owner: ether [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.024



Subject: Fails t/06-prereq-failures.t on 5.25.10 ( . in @INC? )

t/01-basic.t ............... ok

    #   Failed test 'correctly captured errors from configure-requires and dumped them'
    #   at t/06-prereq-failures.t line 92.
    # Compared array length of $data
    #    got : array with 0 element(s)
    # expect : array with 1 element(s)
    # got warnings: []
    # Looks like you failed 1 test of 1.

Show quoted text
#   Failed test 'run the generated test'
#   at t/06-prereq-failures.t line 98.
# Looks like you failed 1 test of 4.
t/06-prereq-failures.t .....
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests
t/05-preamble.t ............ ok

Test Summary Report
-------------------
t/06-prereq-failures.t   (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=8, Tests=38,  3 wallclock secs ( 0.05 usr  0.02 sys +  9.63 cusr  0.79 csys = 10.49 CPU)

Also: http://www.cpantesters.org/cpan/report/73e33970-ebf8-11e6-80e8-656d271d6a22


-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
On 2017-02-27 09:48:32, KENTNL wrote: Show quoted text
> t/01-basic.t ............... ok > > # Failed test 'correctly captured errors from configure-requires and > dumped > them' > # at t/06-prereq-failures.t line 92. > # Compared array length of $data > # got : array with 0 element(s) > # expect : array with 1 element(s) > # got warnings: [] > # Looks like you failed 1 test of 1.
This error does not seem to be related to the quoted cpantesters failure: Show quoted text
..although I can reproduce neither of these.

On 2017-02-28 08:20:33, ETHER wrote:
> On 2017-02-27 09:48:32, KENTNL wrote:
> > t/01-basic.t ............... ok
> >
> > # Failed test 'correctly captured errors from configure-requires and
> > dumped
> > them'
> > # at t/06-prereq-failures.t line 92.
> > # Compared array length of $data
> > # got : array with 0 element(s)
> > # expect : array with 1 element(s)
> > # got warnings: []
> > # Looks like you failed 1 test of 1.
>
> This error does not seem to be related to the quoted cpantesters
> failure:
>
> > http://www.cpantesters.org/cpan/report/73e33970-ebf8-11e6-80e8-
> > 656d271d6a22
>

It seemed related at the time because it was exposing lack of dot-in-INC related issues, but further analysis now suggests its a different problem, but still dot-in-INC related.

> ..although I can reproduce neither of these.

I can confirm injecting "use lib '.'" at the top of this test solves the failure.

But I'm at a loss as to why....

I added this blob of code to the end of the `use ` blocks for diagnosis:

push @INC, sub {
  our @CARP_NOT=("Module::Runtime");
  Carp::carp("Can't find $_[1]");
};

And it generated the following test output:

Can't find Log/Agent.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux/Storable.pm line 32.
Can't find Ref/Util.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/Specio/Library/Builtins.pm line 21.
Can't find Moose/Meta/Attribute/Custom/Trait/Hash.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
Can't find Moose/Meta/Attribute/Custom/Trait/Moose/Meta/Attribute/Native/Trait/Hash.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
Can't find Encode/ConfigLocal.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux/Encode.pm line 61.
Can't find Moose/Meta/Attribute/Custom/Trait/SetOnce.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
Can't find Moose/Meta/Attribute/Custom/Trait/MooseX/SetOnce/Attribute.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
Can't find Moose/Meta/Attribute/Custom/Trait/Array.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
Can't find Moose/Meta/Attribute/Custom/Trait/Moose/Meta/Attribute/Native/Trait/Array.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
Can't find Unicode/UTF8.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/Path/Tiny.pm line 44.
Can't find Moose/Meta/Attribute/Custom/Trait/Bool.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
Can't find Moose/Meta/Attribute/Custom/Trait/Moose/Meta/Attribute/Native/Trait/Bool.pm at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux/Moose/Util.pm line 239.
ok 1 - build proceeds normally
ok 2 - all prereqs are in place; configs are properly included in metadata
ok 3 - no trailing whitespace in generated Build.PL
# Subtest: run the generated test
    # ran tests successfully
    not ok 1 - correctly captured errors from configure-requires and dumped them
    #   Failed test 'correctly captured errors from configure-requires and dumped them'
    #   at t/06-prereq-failures.t line 96.
    # Using Regexp on $data->[0]
    #    got : 'Can't find Build.PL at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/Test/Warnings.pm line 80.
    # '
    # expect : (?^m:^Errors from configure prereqs:\n\s*\{\n\s+'Acme::EtherSaysThisWillNeverExist' => 'Can\\'t locate .+\n',\n\s+'Module::Build::Tiny' => ''\n\s*\}\n)
    # got warnings: [
    #   'Can\'t find Build.PL at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/Test/Warnings.pm line 80.
    # '
    # ]
    1..1
    # Looks like you failed 1 test of 1.
not ok 4 - run the generated test
#   Failed test 'run the generated test'
#   at t/06-prereq-failures.t line 102.
1..4
# Looks like you failed 1 test of 4.
 

Further enhancing the error code as follows:


push @INC, sub {
  our @CARP_NOT=("Module::Runtime");
  Carp::carp("Can't find $_[1]");
  if ( $_[1] eq "Build.PL" ) {
    *STDERR->print(Carp::longmess);
  }
};
 

 

Eventually reveals:

 at t/06-prereq-failures.t line 95.
    main::__ANON__() called at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/Test/Warnings.pm line 80
    Test::Warnings::warnings(CODE(0x268b618)) called at t/06-prereq-failures.t line 95
    main::__ANON__() called at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/Test/Builder.pm line 309
    eval {...} called at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/Test/Builder.pm line 309
    Test::Builder::subtest(Test::Builder=HASH(0x1e08c00), "run the generated test", CODE(0x3db82d0)) called at /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/Test/More.pm line 807
    Test::More::subtest("run the generated test", CODE(0x3db82d0)) called at t/06-prereq-failures.t line 105


Which points the finger at this block of code:

   my @warnings = warnings { do 'Build.PL' };


Ah. `do` :)


-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

resolved with release 0.024.