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

ext/nqp-rx/t/nqp/46-charspec.t fails in find_codepoint without icu #874

Closed
jkeenan opened this issue Dec 5, 2012 · 8 comments
Closed

ext/nqp-rx/t/nqp/46-charspec.t fails in find_codepoint without icu #874

jkeenan opened this issue Dec 5, 2012 · 8 comments
Assignees

Comments

@jkeenan
Copy link
Contributor

jkeenan commented Dec 5, 2012

Observed today while running 'make test' at 4aee736 on Darwin/x86_64. Here is an excerpt from by test log:

no ICU lib loaded
current instr.: 'parrot;HLL;Actions;charname' pc 21203 (ext/nqp-rx/src/stage0/HLL-s0.pir:7328)
called from Sub 'parrot;Regex;Cursor;!reduce' pc 1238 (ext/nqp-rx/src/stage0/Regex-s0.pir:744)
called from Sub 'parrot;Regex;Cursor;!cursor_pass' pc 692 (ext/nqp-rx/src/stage0/Regex-s0.pir:414)
called from Sub 'parrot;HLL;Grammar;charname' pc 15620 (ext/nqp-rx/src/stage0/HLL-s0.pir:5083)
called from Sub 'parrot;HLL;Grammar;charnames' pc 16293 (ext/nqp-rx/src/stage0/HLL-s0.pir:5295)
called from Sub 'parrot;HLL;Grammar;charspec' pc 16679 (ext/nqp-rx/src/stage0/HLL-s0.pir:5407)
called from Sub 'parrot;HLL;Grammar;quote_escape:sym<chr>' pc 13903 (ext/nqp-rx/src/stage0/HLL-s0.pir:4573)
called from Sub 'parrot;Regex;Cursor;!protoregex' pc 2520 (ext/nqp-rx/src/stage0/Regex-s0.pir:1295)
called from Sub 'parrot;HLL;Grammar;quote_escape' pc 10765 (ext/nqp-rx/src/stage0/HLL-s0.pir:3579)
called from Sub 'parrot;HLL;Grammar;quote_atom' pc 5782 (ext/nqp-rx/src/stage0/HLL-s0.pir:2156)
called from Sub 'parrot;HLL;Grammar;quote_delimited' pc 5377 (ext/nqp-rx/src/stage0/HLL-s0.pir:2045)
called from Sub 'parrot;HLL;Grammar;quote_EXPR' pc 919 (ext/nqp-rx/src/stage0/HLL-s0.pir:550)
called from Sub 'parrot;NQP;Grammar;quote:sym<dblq>' pc 43771 (ext/nqp-rx/src/stage0/NQP-s0.pir:12232)
called from Sub 'parrot;Regex;Cursor;!protoregex' pc 2520 (ext/nqp-rx/src/stage0/Regex-s0.pir:1295)
called from Sub 'parrot;NQP;Grammar;quote' pc 43329 (ext/nqp-rx/src/stage0/NQP-s0.pir:12087)
called from Sub 'parrot;NQP;Grammar;value' pc 42648 (ext/nqp-rx/src/stage0/NQP-s0.pir:11905)
called from Sub 'parrot;NQP;Grammar;term:sym<value>' pc 42361 (ext/nqp-rx/src/stage0/NQP-s0.pir:11819)
called from Sub 'parrot;Regex;Cursor;!protoregex' pc 2520 (ext/nqp-rx/src/stage0/Regex-s0.pir:1295)
called from Sub 'parrot;NQP;Grammar;term' pc 40076 (ext/nqp-rx/src/stage0/NQP-s0.pir:11148)
called from Sub 'parrot;HLL;Grammar;termish' pc 2977 (ext/nqp-rx/src/stage0/HLL-s0.pir:1297)
called from Sub 'parrot;HLL;Grammar;EXPR' pc 1228 (ext/nqp-rx/src/stage0/HLL-s0.pir:674)
called from Sub 'parrot;NQP;Grammar;arglist' pc 42086 (ext/nqp-rx/src/stage0/NQP-s0.pir:11733)
called from Sub 'parrot;NQP;Grammar;args' pc 41745 (ext/nqp-rx/src/stage0/NQP-s0.pir:11634)
called from Sub 'parrot;NQP;Grammar;term:sym<identifier>' pc 40630 (ext/nqp-rx/src/stage0/NQP-s0.pir:11317)
called from Sub 'parrot;Regex;Cursor;!protoregex' pc 2557 (ext/nqp-rx/src/stage0/Regex-s0.pir:1308)
called from Sub 'parrot;NQP;Grammar;term' pc 40076 (ext/nqp-rx/src/stage0/NQP-s0.pir:11148)
called from Sub 'parrot;HLL;Grammar;termish' pc 2977 (ext/nqp-rx/src/stage0/HLL-s0.pir:1297)
called from Sub 'parrot;HLL;Grammar;EXPR' pc 1228 (ext/nqp-rx/src/stage0/HLL-s0.pir:674)
called from Sub 'parrot;NQP;Grammar;statement' pc 7666 (ext/nqp-rx/src/stage0/NQP-s0.pir:2464)
called from Sub 'parrot;NQP;Grammar;statementlist' pc 7151 (ext/nqp-rx/src/stage0/NQP-s0.pir:2333)
called from Sub 'parrot;NQP;Grammar;comp_unit' pc 6694 (ext/nqp-rx/src/stage0/NQP-s0.pir:2207)
called from Sub 'parrot;NQP;Grammar;TOP' pc 1322 (ext/nqp-rx/src/stage0/NQP-s0.pir:528)
called from Sub 'parrot;Regex;Cursor;parse' pc 371 (ext/nqp-rx/src/stage0/Regex-s0.pir:230)
called from Sub 'parrot;HLL;Compiler;parse' pc 96 (ext/nqp-rx/src/stage0/HLL-s0.pir:63)
called from Sub 'parrot;PCT;HLLCompiler;compile' pc 459 (compilers/pct/src/PCT/HLLCompiler.pir:326)
called from Sub 'parrot;HLL;Compiler;eval' pc 24537 (ext/nqp-rx/src/stage0/HLL-s0.pir:8848)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1496 (compilers/pct/src/PCT/HLLCompiler.pir:759)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1721 (compilers/pct/src/PCT/HLLCompiler.pir:874)
called from Sub 'parrot;NQP;Compiler;main' pc 92462 (ext/nqp-rx/src/stage0/NQP-s0.pir:28374)
ext/nqp-rx/t/nqp/46-charspec.t .............. 
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run 


ext/nqp-rx/t/nqp/46-charspec.t            (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
@rurban
Copy link
Member

rurban commented Dec 6, 2012

On Dec 5, 2012, at 2:08 PM, James E Keenan notifications@github.com wrote:

Observed today while running 'make test' at 4aee736 on Darwin/x86_64. Here is an excerpt from by test log:

no ICU lib loaded

Thanks, good catch!
We need to skip this test when ICU is not available.

ext/nqp-rx/t/nqp/46-charspec.t ..............
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run

ext/nqp-rx/t/nqp/46-charspec.t (Wstat: 256 Tests: 0 Failed: 0)
Non-zero exit status: 1
Parse errors: No plan found in TAP output

@jkeenan
Copy link
Contributor Author

jkeenan commented Dec 6, 2012

On 12/5/12 7:46 PM, Reini Urban wrote:

On Dec 5, 2012, at 2:08 PM, James E Keenannotifications@github.com wrote:

Observed today while running 'make test' at 4aee736 on Darwin/x86_64. Here is an excerpt from by test log:

no ICU lib loaded

Thanks, good catch!
We need to skip this test when ICU is not available.

That sounds correct. We have had to account for non-availability of ICU
several times in the past.

Tomorrow I will try to confirm the fix on the machine where I first
observed it.

@jkeenan
Copy link
Contributor Author

jkeenan commented Dec 6, 2012

I mistakenly thought a fix already had been committed, but that was not so. So there was nothing for me to check today.

The file in question is written in parrot-nqp. I don't know the syntax for "skip all tests unless $PConfig{has_icu}" in that language, and I couldn't find any prior art in other files in the distro written in parrot-nqp.

If anyone knows how to do that, please come up to the blackboard and show us. :-)

Thank you very much.
Jim Keenan

@rurban
Copy link
Member

rurban commented Dec 7, 2012

I've only learned recently that nqp and nqp-rx create uncatchable
compile-time errors when icu is not present and the src code contains
\cxx charnames. There's no nqp BEGIN block, only a INIT block.

No way to skip the test inside the test.
So we must skip one test from the suite if parrot has no icu, in all
three nqp repos.
parrot/ext/nqp-rx, perl6/nqp and perl6/nqp-rx

This ticket belongs to perl6/nqp, since this is the final upstream repo for the ext/nqp-rx tests,
which are kept in synch with perl6/nqp-rx.

no ICU lib loaded
current instr.: 'parrot;HLL;Actions;charname' pc 21203 (ext/nqp-rx/src/stage0/HLL-s0.pir:7328)
called from Sub 'parrot;Regex;Cursor;!reduce' pc 1238 (ext/nqp-rx/src/stage0/Regex-s0.pir:744)
called from Sub 'parrot;Regex;Cursor;!cursor_pass' pc 692 (ext/nqp-rx/src/stage0/Regex-s0.pir:414)

...

HLL;Actions;charname calls find_codepoint at parse-time which fails without ICU.

@jkeenan
Copy link
Contributor Author

jkeenan commented Dec 7, 2012

On 12/6/12 7:42 PM, Reini Urban wrote:

I've only learned recently that nqp and nqp-rx create uncatchable
compile-time errors when icu is not present and the src code contains
\cxx charnames. There's no nqp BEGIN block, only a INIT block.

No way to skip the test inside the test.
So we must skip one test from the suite if parrot has no icu, in all
three nqp repos.
parrot/ext/nqp-rx, perl6/nqp and perl6/nqp-rx

This ticket belongs to perl6/nqp, since this is the final upstream repo for the ext/nqp-rx tests,
which are kept in synch with perl6/nqp-rx.

Would it be possible to cheat by changing the test file to a Perl 5
test, then wrapping each parrot-nqp ok() call inside a 'system' call,
then checking for 0 return value?


Reply to this email directly or view it on GitHub:
#874 (comment)

@rurban
Copy link
Member

rurban commented Dec 7, 2012

On Dec 6, 2012, at 9:44 PM, James E Keenan notifications@github.com wrote:

On 12/6/12 7:42 PM, Reini Urban wrote:

I've only learned recently that nqp and nqp-rx create uncatchable
compile-time errors when icu is not present and the src code contains
\cxx charnames. There's no nqp BEGIN block, only a INIT block.

No way to skip the test inside the test.
So we must skip one test from the suite if parrot has no icu, in all
three nqp repos.
parrot/ext/nqp-rx, perl6/nqp and perl6/nqp-rx

This ticket belongs to perl6/nqp, since this is the final upstream repo for the ext/nqp-rx tests,
which are kept in synch with perl6/nqp-rx.

Would it be possible to cheat by changing the test file to a Perl 5
test, then wrapping each parrot-nqp ok() call inside a 'system' call,
then checking for 0 return value?

This or fix nqp to avoid calling find_codepoint when icu is not configured.
I'm almost there.

@leto
Copy link
Member

leto commented Mar 25, 2013

@rurban are you still working on this?

@rurban rurban changed the title ext/nqp-rx/t/nqp/46-charspec.t: failure in new test ext/nqp-rx/t/nqp/46-charspec.t fails in find_codepoint without icu Nov 23, 2014
@rurban
Copy link
Member

rurban commented Nov 23, 2014

fix confirmed in Raku/nqp#151
and tested --without-icu ok:

ext/nqp-rx/t/nqp/46-charspec.t ............. ok
ext/nqp-rx/t/nqp/47-loop-control.t ......... ok
ext/nqp-rx/t/nqp/48-closure.t .............. ok
ext/nqp-rx/t/nqp/49-regex-interpolation.t .. ok
ext/nqp-rx/t/nqp/50-regex.t ................ ok
ext/nqp-rx/t/nqp/51-multi.t ................ ok
ext/nqp-rx/t/nqp/52-vtable.t ............... ok
ext/nqp-rx/t/nqp/67-threads.t .............. ok
All tests successful.

@rurban rurban closed this as completed Nov 23, 2014
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

3 participants