celogeek / MooX-Options

Add option and new_with_options to Moo object
Other
11 stars 21 forks source link

Failing to build tests with ./Build test due to -w flag #34

Closed nicomen closed 9 years ago

nicomen commented 9 years ago

When I run ./Build test the autosplit test fails, when I run prove -lv t everything is fine.

The reason seems to be that Build test runs perl -w, while prove does not have the "-w" flag

nicomen commented 9 years ago

Hm, turns out this was caused by an old Getopt::Long (2.38) upgrading to 2.43 does not trigger the warning. Would it be wise to update the prereqs?

celogeek commented 9 years ago

yes I can do that.

nicomen commented 9 years ago

May seem like the fix is in 2.39

https://metacpan.org/source/JV/Getopt-Long-2.43/CHANGES

nicomen commented 9 years ago

Just confirmed that tests pass with 2.39

nicomen commented 9 years ago

Thanks ;-)

celogeek commented 9 years ago

I have run test with Getopt::Long 2.38 :

t/00-compile.t ........................... ok
# Testing with Perl 5.020001, /home/celogeek/perl5/perlbrew/perls/perl-5.20.1/bin/perl
#     Capture::Tiny version is 0.25
#     Carp version is 1.3301
#     Data::Record version is 0.02
#     English version is 1.09
#     File::Spec version is 3.48
#     FindBin version is 1.51
#     Getopt::Long version is 2.38
#     Getopt::Long::Descriptive version is 0.099
#     IO::Handle version is 1.35
#     IPC::Open3 version is 1.16
#     JSON version is 2.90
#     MRO::Compat version is 0.12
#     Module::Build version is 0.421
#     Module::Metadata version is 1.000019
#     Moo version is 1.006001
#     MooX::ConfigFromFile version is 0.004
#     Path::Class version is 0.35
#     Pod::Usage version is 1.63
#     Regexp::Common version is 2013031301
#     Role::Tiny::With version is 1.003004
#     Scalar::Util version is 1.41
#     Test::More version is 1.001008
#     Test::Requires version is 0.08
#     Test::Trap version is 0.2.2
#     Text::LineFold version is 2012.04
#     Try::Tiny version is 0.22
#     feature version is 1.36
#     lib version is 0.63
#     namespace::clean version is 0.25
#     overload version is 1.22
#     parent version is 0.228
#     strict version is 1.08
#     warnings version is 1.23
t/000-report-versions.t .................. ok
t/around_options_usage.t ................. ok
t/author-critic.t ........................ skipped: these tests are for testing by the author
t/autosplit_warning_on_required_param.t .. ok
t/check_target_methods.t ................. ok
t/doc-utf8.t ............................. ok
t/doc.t .................................. ok
t/failure.t .............................. ok
t/flavour.t .............................. ok
t/hidden.t ............................... ok
t/isa_check.t ............................ ok
t/mo.t ................................... ok
t/moo.t .................................. ok
t/moose.t ................................ ok
t/moox-cmd.t ............................. ok
t/multi_role.t ........................... ok
t/namespace_clean.t ...................... ok
t/no_option.t ............................ ok
t/option-of-option.t ..................... ok
t/order.t ................................ ok
t/pod.t .................................. skipped: these tests are for release candidate testing
t/release-kwalitee.t ..................... skipped: these tests are for release candidate testing
t/release-pod-coverage.t ................. skipped: these tests are for release candidate testing
t/release-unused-vars.t .................. skipped: these tests are for release candidate testing
t/role.t ................................. ok
t/string_with_zero_value.t ............... ok
t/with_config.t .......................... ok
All tests successful.
Files=28, Tests=133, 23 wallclock secs ( 0.55 usr  0.11 sys + 20.78 cusr  1.75 csys = 23.19 CPU)
Result: PASS

I run perl Build.PL, then ./Build test

I try the "-w" option now

celogeek commented 9 years ago

no, I can't set this up.

Do you have a config somewhere that force the fatal warnings ?

nicomen commented 9 years ago

Ah maybe my Module::Build is adding the -w somehow? let me investigate

celogeek commented 9 years ago

If you find it, tell me, I may solve the warnings issue (deps or something else), and then support fatal warnings during the tests.

nicomen commented 9 years ago

$ strace -s 100 -ff -v -e execve ./Build test

gives me:

[pid 18156] execve("/usr/bin/perl", ["/usr/bin/perl", "-w", "t/autosplit_warning_on_required_param.t"], ["LC_PAPER=nb_NO.UTF-8", "LC_ADDRESS=nb_NO.UTF-8", "LC_MONETARY=nb_NO.UTF-8", "SHELL=/bin/bash", "TERM=xterm", "LC_NUMERIC=nb_NO.UTF-8", "USER=root", "LC_TELEPHONE=nb_NO.UTF-8", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;0"..., "SUDO_USER=nicolasm", "SUDO_UID=1000", "USERNAME=root", "MAIL=/var/mail/root", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LC_IDENTIFICATION=nb_NO.UTF-8", "PWD=/build/MooX-Options-4.016", "LANG=nb_NO.UTF-8", "LC_MEASUREMENT=nb_NO.UTF-8", "SHLVL=1", "SUDO_COMMAND=/usr/sbin/chroot chroot", "HOME=/home/nicolasm", "LANGUAGE=nb_NO:en_US:en", "LOGNAME=root", "SUDO_GID=1000", "DISPLAY=:0", "LC_TIME=nb_NO.UTF-8", "XAUTHORITY=/home/nicolasm/.Xauthority", "LC_NAME=nb_NO.UTF-8", "_=/usr/bin/strace", "OLDPWD=/", "PERL_DL_NONLAZY=1", "HARNESS_ACTIVE=1", "HARNESS_VERSION=3.35", "TEST_VERBOSE=0", "HARNESS_VERBOSE=0", "TAP_VERSION=13", "PERL5LIB=/build/MooX-Options-4.016/blib/lib:/build/MooX-Options-4.016/blib/arch"]) = 0
nicomen commented 9 years ago

Also, I just noticed this:

from Module::Build changes

0.4008 - Mon Nov 4 23:10:54 CET 2013

[BUG FIXES]

my Ubuntu Precise has Module::Build 0.38

celogeek commented 9 years ago

Oh, I see. And if you upgrade Module::Build ? do you have the switch ?

nicomen commented 9 years ago

Upgrading to Module::Build 0.4008 makes the tests pass.

It executes the test like this: [pid 16587] execve("/usr/bin/perl", ["/usr/bin/perl", "t/autosplit_warning_on_required_param.t"], [/* 35 vars */]) = 0

celogeek commented 9 years ago

So I should force upgrade of Module::Build ?

nicomen commented 9 years ago

Well, it depends what you want. For my case I can just upgrade Module::Build >= 0.4008, but if you upgrade the dependency of Getopt::Long >= 2.39 (to one without warning errors), I think that is the most sensible thing.

celogeek commented 9 years ago

Well, I will do both, it will avoid several compatibility issue

celogeek commented 9 years ago

release in 4.017.