On 11/22/15 11:44 AM, Alceu R. de Freitas Jr. wrote:
> Hi there,
> 
> I migrating my distro to Dist::Zilla and spot a problem when trying to
> to run "dzil test" with it: my tests fails due dependency failure in
> installing Test::TempDir::Tiny. That happened in a Windows 7 with
> Strawberry Perl installed:
> 
> his is perl 5, version 18, subversion 2 (v5.18.2) built for
> MSWin32-x64-multi-thread
> 
> The problem is that this distro is not stated as missing. I tried with
> "dzil build", checked the Makefile.PL and Test::TempDir::Tiny is inside
> the TEST_REQUIRES:
> 
>   "TEST_REQUIRES" => {
>     "Class::Data::Inheritable" => "0.08",
>     "Config::IniFiles" => "2.83",
>     "Cwd" => 0,
>     "Devel::Gladiator" => "0.07",
>     "Proc::Background" => "1.10",
>     "Proc::Daemon" => "0.18",
>     "Test::Class" => "0.36",
>     "Test::Moose" => "2.0801",
>     "Test::More" => 0,
>     "Test::Most" => "0.25",
>     "Test::Pod" => "1.22",
>     "Test::Pod::Coverage" => "1.08",
>    *"Test::TempDir::Tiny" => "0.004"*
>   },
> 
> C:\temp\siebel-monitoring-tools\Siebel-Srvrmgr\Siebel-Srvrmgr-0.21>prove -l
> t\ActionCheckComps.t ............ Can't locate Test/TempDir/Tiny.pm in
> @INC (you may need to install the Test::TempDir::Tiny module) (@INC
> contains: t
> C:\temp\siebel-monitoring-tools\Siebel-Srvrmgr\Siebel-Srvrmgr-0.21\lib
> C:/strawberry/perl/site/lib/MSWin32-x64-multi-thre
> ad C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib
> C:/strawberry/perl/lib .) at t/Test/Siebel/Srvrmgr/Daemon/Action.pm line 6.
> BEGIN failed--compilation aborted at
> t/Test/Siebel/Srvrmgr/Daemon/Action.pm line 6.
> Compilation failed in require at C:/strawberry/perl/lib/parent.pm line 20.
> BEGIN failed--compilation aborted at
> t/Test/Siebel/Srvrmgr/Daemon/Action/CheckComps.pm line 3.
> Compilation failed in require at t\ActionCheckComps.t line 2.
> BEGIN failed--compilation aborted at t\ActionCheckComps.t line 2.
> t\ActionCheckComps.t ............ Dubious, test returned 2 (wstat 512,
> 0x200)
> No subtests run
> t\ActionCheckCompsRoleComp.t .... ok
> t\ActionCheckCompsRoleServer.t .. ok
> t\ActionDumper.t ................ Terminating on signal SIGINT(2)
> Terminate batch job (Y/N)? y
> 
> If I move Test::TempDir::Tiny (directly in the Makefile.PL) to
> BUILD_REQUIRES, I do get a warning for the missing dependency (which is
> the expected thing). But I think that defeats the purpose of TEST_REQUIRES.
> 
> The current version of Extutils::MakeMaker is above the minimum required
> to understand TEST_REQUIRES:
> 
> C:\temp\siebel-monitoring-tools\Siebel-Srvrmgr\Siebel-Srvrmgr-0.21>mversion
> ExtUtils::MakeMaker
> 7.10
> 
> And finally, Test::TempDir::Tiny is referenced in the Makefile itself:
> 
> #   MakeMaker Parameters:
> 
> #     ABSTRACT => q[utilities to be used with the Siebel srvrmgr program]
> #     AUTHOR => [q[Alceu Rodrigues de Freitas Junior <arfrei...@cpan.org>]]
> #     BUILD_REQUIRES => {  }
> #     CONFIGURE_REQUIRES => { ExtUtils::MakeMaker=>q[0] }
> #     DISTNAME => q[Siebel-Srvrmgr]
> #     EXE_FILES => [q[bin/srvrmgr-mock.pl]]
> #     LICENSE => q[gpl]
> #     MIN_PERL_VERSION => q[5.008009]
> #     NAME => q[Siebel::Srvrmgr]
> #     *PREREQ_PM* => { Carp=>q[0], Class::Data::Inheritable=>q[0.08],
> Config::IniFiles=>q[2.83], Cwd=>q[0], Data::Dumper=>q[0],
> DateTime=>q[1.12], Devel::Gladiator=>q[0.07], Encode=>q[0],
> Exporter=>q[0], FSA::Rules=>q[0.34], Fcntl=>q[0], File::BOM=>q[0.14],
> File::Copy=>q[0], File::Spec=>q[0], File::Temp=>q[0.2304],
> Getopt::Std=>q[0], Hash::Util=>q[0], IO::Select=>q[0], IO::Socket=>q[0],
> IPC::Open3=>q[0], List::Util=>q[1.42], Log::Log4perl=>q[1.41],
> Moose=>q[2.0401], Moose::Role=>q[2.1604], Moose::Util=>q[2.1604],
> Moose::Util::TypeConstraints=>q[2.0402],
> MooseX::AbstractFactory=>q[0.004000], MooseX::FollowPBP=>q[0.05],
> MooseX::Singleton=>q[0], MooseX::Storage=>q[0.33], POSIX=>q[0],
> Proc::Background=>q[1.10], Proc::Daemon=>q[0.18], Scalar::Util=>q[0],
> Scalar::Util::Numeric=>q[0.40], Set::Tiny=>q[0.02], Storable=>q[2.51],
> String::BOM=>q[0.3], Symbol=>q[0], Test::Class=>q[0.36],
> Test::Moose=>q[2.0801], Test::More=>q[0], Test::Most=>q[0.25],
> Test::Pod=>q[1.22], Test::Pod::Coverage=>q[1.08],
> *Test::TempDir::Tiny*=>q[0.004], YAML::Syck=>q[1.29],
> namespace::autoclean=>q[0.13] }
> #     *TEST_REQUIRES* => { Class::Data::Inheritable=>q[0.08],
> Config::IniFiles=>q[2.83], Cwd=>q[0], Devel::Gladiator=>q[0.07],
> Proc::Background=>q[1.10], Proc::Daemon=>q[0.18], Test::Class=>q[0.36],
> Test::Moose=>q[2.0801], Test::More=>q[0], Test::Most=>q[0.25],
> Test::Pod=>q[1.22], Test::Pod::Coverage=>q[1.08],
> *Test::TempDir::Tiny*=>q[0.004] }
> #     VERSION => q[0.21]
> #     test => { TESTS=>q[t/*.t] }
> 
> Maybe I just caught a bug in ExtUtils::MakeMaker? Or I'm missing something?
> 
> I'm still to try the same test in other OS without those dependencies
> installed.
> 
> Thanks,
> 
> Alceu

The primary purpose of TEST_REQUIRES etc is to declare the metadata for
other tools to use.  In this sense, TEST_REQUIRES works fine, because it
is put into the META/MYMETA files and the Makefile.  The warnings were
overlooked when TEST_REQUIRES was added.  This has been fixed[1] in the
development versions of EUMM, which will hopefully see a stable release
soon.

[1]
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/4d42d80e2ac312fecda701c42d4aba0ea1e96af2

Reply via email to