Skip to content
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

Test failure with threaded perl 5.21.4 and higher #139

Closed
jplesnik opened this issue May 19, 2015 · 5 comments
Closed

Test failure with threaded perl 5.21.4 and higher #139

jplesnik opened this issue May 19, 2015 · 5 comments

Comments

@jplesnik
Copy link

Tests failed with threaded Perl 5.21.4 and higher. Unthreaded 5.21.x passes all tests.

See http://www.cpantesters.org/cpan/report/c081e306-f7e6-11e4-b80d-f1571b12eb46 for a sample fail report and http://matrix.cpantesters.org/?dist=Text-Xslate+3.3.4 for a fail/pass overview.

@zdm
Copy link

zdm commented Jun 21, 2015

Not installed under strabberry perl 5.22 due to this error.

Here is the log

t/010_internals/039_taint_issue84.t ............. ok
t/010_internals/100_threads.t ................... 1/13 Use of uninitialized value $syntax in concatenation (.) or string at D:\tmp\.cpanm\work\1434921820.29
04\Text-Xslate-3.3.4\blib\lib/Text/Xslate/Compiler.pm line 211.
Thread 2 terminated abnormally: Invalid class name (undef) at D:/devel/perl/perl/site/lib/Mouse/Util.pm line 276 thread 2.
        Mouse::Util::_try_load_one_class(undef) called at D:/devel/perl/perl/site/lib/Mouse/Util.pm line 250 thread 2
        Mouse::Util::load_first_existing_class("Text::Xslate::Syntax::", undef) called at D:\tmp\.cpanm\work\1434921820.2904\Text-Xslate-3.3.4\blib\lib/Text
/Xslate/Compiler.pm line 211 thread 2
        Text::Xslate::Compiler::_build_parser(Text::Xslate::Compiler=HASH(0x31893e0)) called at D:\tmp\.cpanm\work\1434921820.2904\Text-Xslate-3.3.4\blib\li
b/Text/Xslate/Compiler.pm line 291 thread 2
        Text::Xslate::Compiler::compile(Text::Xslate::Compiler=HASH(0x31893e0), "Hello, <:= \$lang :> world!\x{a}", "file", "D:\\tmp\\.cpanm\\work\\14349218
20.2904\\Text-Xslate-3.3.4\\t\\V9zzKW"..., "name", "D:\\tmp\\.cpanm\\work\\1434921820.2904\\Text-Xslate-3.3.4\\t\\V9zzKW"..., "omit_augment", "") called at
D:\tmp\.cpanm\work\1434921820.2904\Text-Xslate-3.3.4\blib\lib/Text/Xslate.pm line 649 thread 2
        Text::Xslate::Engine::compile(Text::Xslate=HASH(0x3182c28), "Hello, <:= \$lang :> world!\x{a}", "file", "D:\\tmp\\.cpanm\\work\\1434921820.2904\\Tex
t-Xslate-3.3.4\\t\\V9zzKW"..., "name", "D:\\tmp\\.cpanm\\work\\1434921820.2904\\Text-Xslate-3.3.4\\t\\V9zzKW"...) called at D:\tmp\.cpanm\work\1434921820.29
04\Text-Xslate-3.3.4\blib\lib/Text/Xslate.pm line 410 thread 2
        Text::Xslate::Engine::_load_source(Text::Xslate=HASH(0x3182c28), HASH(0x315acd8), 0) called at D:\tmp\.cpanm\work\1434921820.2904\Text-Xslate-3.3.4\
blib\lib/Text/Xslate.pm line 362 thread 2
        Text::Xslate::Engine::load_file(Text::Xslate=HASH(0x3182c28), "hello.tx", 0, "") called at t/010_internals/100_threads.t line 36 thread 2
        eval {...} called at t/010_internals/100_threads.t line 36 thread 2
        main::__ANON__() called at t/010_internals/100_threads.t line 37 thread 2
        eval {...} called at t/010_internals/100_threads.t line 37 thread 2
t/010_internals/100_threads.t ................... 5/13 Use of uninitialized value $syntax in concatenation (.) or string at D:\tmp\.cpanm\work\1434921820.29
04\Text-Xslate-3.3.4\blib\lib/Text/Xslate/Compiler.pm line 211.
Thread 3 terminated abnormally: Invalid class name (undef) at D:/devel/perl/perl/site/lib/Mouse/Util.pm line 276 thread 3.
        Mouse::Util::_try_load_one_class(undef) called at D:/devel/perl/perl/site/lib/Mouse/Util.pm line 250 thread 3
        Mouse::Util::load_first_existing_class("Text::Xslate::Syntax::", undef) called at D:\tmp\.cpanm\work\1434921820.2904\Text-Xslate-3.3.4\blib\lib/Text
/Xslate/Compiler.pm line 211 thread 3
        Text::Xslate::Compiler::_build_parser(Text::Xslate::Compiler=HASH(0x344b408)) called at D:\tmp\.cpanm\work\1434921820.2904\Text-Xslate-3.3.4\blib\li
b/Text/Xslate/Compiler.pm line 291 thread 3
        Text::Xslate::Compiler::compile(Text::Xslate::Compiler=HASH(0x344b408), "<: [10, 20, 30].count(-> \$a { true }) :>", "omit_augment", undef) called a
t D:\tmp\.cpanm\work\1434921820.2904\Text-Xslate-3.3.4\blib\lib/Text/Xslate.pm line 649 thread 3
        Text::Xslate::Engine::compile(Text::Xslate=HASH(0x344ab48), "<: [10, 20, 30].count(-> \$a { true }) :>") called at D:\tmp\.cpanm\work\1434921820.290
4\Text-Xslate-3.3.4\blib\lib/Text/Xslate.pm line 277 thread 3
        Text::Xslate::Engine::load_string(Text::Xslate=HASH(0x344ab48), "<: [10, 20, 30].count(-> \$a { true }) :>") called at t/010_internals/100_threads.t
 line 57 thread 3
        main::__ANON__() called at t/010_internals/100_threads.t line 58 thread 3
        eval {...} called at t/010_internals/100_threads.t line 58 thread 3
# Looks like you planned 13 tests but ran 9.
t/010_internals/100_threads.t ................... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 4/13 subtests
t/010_internals/200_leaktrace.t ................. ok

@zdm
Copy link

zdm commented Jun 22, 2015

I have found, that problem is in "default" property of Text::Xslate::Compiler attributes.
Under threads default value is not applied for some reasons.
If I rewrite attribute declaration to use "lazy" and "builder" - everything works.
Maybe the problem somewhere in Mouse?
Maybe it time to apply Moo patch? ;-)

@tokuhirom
Copy link
Contributor

ref. xslate/p5-Mouse#29

@syohex
Copy link
Contributor

syohex commented Jun 24, 2015

I wrote patch xslate/p5-Mouse#50

@syohex
Copy link
Contributor

syohex commented Aug 5, 2015

Please check latest version.

@syohex syohex closed this as completed Aug 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants