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

Parsefail when semicolon missing from 'use' statement in Rakudo #1617

Closed
p6rt opened this issue Mar 22, 2010 · 6 comments
Closed

Parsefail when semicolon missing from 'use' statement in Rakudo #1617

p6rt opened this issue Mar 22, 2010 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 22, 2010

Migrated from rt.perl.org#73740 (status was 'resolved')

Searchable as RT73740$

@p6rt
Copy link
Author

p6rt commented Mar 22, 2010

From @masak

Bug courtesy of uasi on Twitter​: <http://twitter.com/uasi/status/10873572370>.

<masak> rakudo​: use Test;
<jnthn> But that came to and end a while ago. :-)
<p6eval> rakudo 35f337​: ( no output )
<masak> rakudo​: use Test
<masak> long delays... :/
<p6eval> rakudo 35f337​: ( no output )
<masak> locally, when I have a file with just 'use A;', it works fine.
If I remove the semicolon, it says 'confused'.
<jnthn> std​: use A;
<jnthn> std​: use A
<p6eval> std 30169​: OUTPUT«Potential difficulties​:␤ Can't locate
module A at /tmp/FQGpoIxpTk line 1​:␤------> �[32muse
A�[33m⏏�[31m;�[0m␤ok 00​:02 106m␤»
<p6eval> std 30169​: OUTPUT«Potential difficulties​:␤ Can't locate
module A at /tmp/hIrELZGAXV line 1 (EOF)​:␤------> �[32muse
A�[33m⏏�[31m<EOL>�[0m␤ok 00​:01 104m␤»
<jnthn> :-/
<masak> both are equally ok.
<jnthn> agree
<jnthn> file Rakudo bug if Rakudo refuses to accept the latter.
* masak files rakudobug

Just for completeness...

$ cat A.pm
say "OH HAI";
$ cat test
use A
$ perl6 test
OH HAI
Confused at line 1, near "use A\n"
[...]

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

From @coke

On Mon Mar 22 07​:28​:11 2010, masak wrote​:

Bug courtesy of uasi on Twitter​:
<http://twitter.com/uasi/status/10873572370>.

<masak> rakudo​: use Test;
<jnthn> But that came to and end a while ago. :-)
<p6eval> rakudo 35f337​: ( no output )
<masak> rakudo​: use Test
<masak> long delays... :/
<p6eval> rakudo 35f337​: ( no output )
<masak> locally, when I have a file with just 'use A;', it works fine.
If I remove the semicolon, it says 'confused'.
<jnthn> std​: use A;
<jnthn> std​: use A
<p6eval> std 30169​: OUTPUT«Potential difficulties​:␤ Can't locate
module A at /tmp/FQGpoIxpTk line 1​:␤------> �[32muse
A�[33m⏏�[31m;�[0m␤ok 00​:02 106m␤»
<p6eval> std 30169​: OUTPUT«Potential difficulties​:␤ Can't locate
module A at /tmp/hIrELZGAXV line 1 (EOF)​:␤------> �[32muse
A�[33m⏏�[31m<EOL>�[0m␤ok 00​:01 104m␤»
<jnthn> :-/
<masak> both are equally ok.
<jnthn> agree
<jnthn> file Rakudo bug if Rakudo refuses to accept the latter.
* masak files rakudobug

Just for completeness...

$ cat A.pm
say "OH HAI";
$ cat test
use A
$ perl6 test
OH HAI
Confused at line 1, near "use A\n"
[...]

This seems to work now​:
$ cat A.pm
say "OH HAI";
$ cat test
use A
$ ./perl6 test
OH HAI

... no trailing confusion. assigning to moritz++ for testing.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 4, 2010

From @moritz

Turns out we actually have a test in t/spec/S10-packages/basic.t for that.

@p6rt
Copy link
Author

p6rt commented Oct 4, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 4, 2010
@p6rt
Copy link
Author

p6rt commented Oct 4, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in S10-packages/basic.t

commit 0676d53e767cc083be9bf534266ec6ab9e60e479
Author​: Moritz Lenz <moritz@​faui2k3.org>
Date​: Mon Oct 4 21​:34​:08 2010 +0200

  mark a test for RT #​73740

Inline Patch
diff --git a/S10-packages/basic.t b/S10-packages/basic.t
index 89293ec..e11b4c0 100644
--- a/S10-packages/basic.t
+++ b/S10-packages/basic.t
@@ -206,6 +206,7 @@ eval_lives_ok q' module MapTester { (1, 2, 3).map: { $_ } } ',
         'overrides from one module do not affect a module that is loaded later on';
 }
 
+# also checks RT #73740
 {
     eval_lives_ok 'use PM6', 'can load a module ending in .pm6';
     is eval('use PM6; pm6_works()'), 42, 'can call subs exported from .pm6 module';

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant