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

-M with non-existant module breaks 'exit' in REPL #5444

Closed
p6rt opened this issue Jul 10, 2016 · 8 comments
Closed

-M with non-existant module breaks 'exit' in REPL #5444

p6rt opened this issue Jul 10, 2016 · 8 comments
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded

Comments

@p6rt
Copy link

p6rt commented Jul 10, 2016

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

Searchable as RT128595$

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

If -M includes a module that can't be found, the output is quite LTA. Not only is the module message spammed on each output, but trying to exit by typing `exit` fails (pressing ^D works).

A suggestion is to abort REPL startup if -M-included modules cannot be found.

zoffix@​VirtualBox​:~$ perl6 -MFoo
Couldn't load Rakudo REPL.pm​: Could not find Foo at line 1 in​:
  /home/zoffix/.perl6
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6
  CompUnit​::Repository​::AbsolutePath<76770752>
  CompUnit​::Repository​::NQP<68716568>
  CompUnit​::Repository​::Perl5<68716608>
Falling back to nqp REPL.

exit
Could not find Foo at line 1 in​:
  /home/zoffix/.perl6
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6
  CompUnit​::Repository​::AbsolutePath<76770752>
  CompUnit​::Repository​::NQP<68716568>
  CompUnit​::Repository​::Perl5<68716608>
  in any load_module at src/Perl6/World.nqp line 1190
  in any do_pragma_or_load_module at src/Perl6/World.nqp line 1120
  in any loading_and_symbol_setup at src/Perl6/World.nqp line 610
  in any comp_unit at src/Perl6/Grammar.nqp line 1157
  in any TOP at src/Perl6/Grammar.nqp line 460

@p6rt
Copy link
Author

p6rt commented Jul 13, 2016

From @zoffixznet

Fudged tests added in Raku/roast@346fa6c7cb

@p6rt
Copy link
Author

p6rt commented Aug 12, 2016

From @lizmat

Hmmm… the todo’d test for this now passes, but the problem still exists (apart from the hanging). So I guess this is a Test Needs To Be Adapted case.

On 10 Jul 2016, at 22​:58, Zoffix Znet (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​128595]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128595 >

If -M includes a module that can't be found, the output is quite LTA. Not only is the module message spammed on each output, but trying to exit by typing `exit` fails (pressing ^D works).

A suggestion is to abort REPL startup if -M-included modules cannot be found.

zoffix@​VirtualBox​:~$ perl6 -MFoo
Couldn't load Rakudo REPL.pm​: Could not find Foo at line 1 in​:
/home/zoffix/.perl6
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6
CompUnit​::Repository​::AbsolutePath<76770752>
CompUnit​::Repository​::NQP<68716568>
CompUnit​::Repository​::Perl5<68716608>
Falling back to nqp REPL.

exit
Could not find Foo at line 1 in​:
/home/zoffix/.perl6
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6
CompUnit​::Repository​::AbsolutePath<76770752>
CompUnit​::Repository​::NQP<68716568>
CompUnit​::Repository​::Perl5<68716608>
in any load_module at src/Perl6/World.nqp line 1190
in any do_pragma_or_load_module at src/Perl6/World.nqp line 1120
in any loading_and_symbol_setup at src/Perl6/World.nqp line 610
in any comp_unit at src/Perl6/Grammar.nqp line 1157
in any TOP at src/Perl6/Grammar.nqp line 460

@p6rt
Copy link
Author

p6rt commented Aug 12, 2016

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

@p6rt
Copy link
Author

p6rt commented Aug 13, 2016

From @awwaiid

"Falling back to nqp REPL" not a good sign. Maybe the CATCH in src/Perl6/Compiler.nqp should notice this case and abort rather than fall back. I'm surprised that it tries to load Foo while trying to load REPL, instead of trying to load Foo at some point beforehand.

On Fri Aug 12 13​:43​:52 2016, elizabeth wrote​:

Hmmm… the todo’d test for this now passes, but the problem still
exists (apart from the hanging). So I guess this is a Test Needs To
Be Adapted case.

On 10 Jul 2016, at 22​:58, Zoffix Znet (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​128595]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128595 >

If -M includes a module that can't be found, the output is quite LTA.
Not only is the module message spammed on each output, but trying to
exit by typing `exit` fails (pressing ^D works).

A suggestion is to abort REPL startup if -M-included modules cannot
be found.

zoffix@​VirtualBox​:~$ perl6 -MFoo
Couldn't load Rakudo REPL.pm​: Could not find Foo at line 1 in​:
/home/zoffix/.perl6
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6
CompUnit​::Repository​::AbsolutePath<76770752>
CompUnit​::Repository​::NQP<68716568>
CompUnit​::Repository​::Perl5<68716608>
Falling back to nqp REPL.

exit
Could not find Foo at line 1 in​:
/home/zoffix/.perl6
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6
CompUnit​::Repository​::AbsolutePath<76770752>
CompUnit​::Repository​::NQP<68716568>
CompUnit​::Repository​::Perl5<68716608>
in any load_module at src/Perl6/World.nqp line 1190
in any do_pragma_or_load_module at src/Perl6/World.nqp line 1120
in any loading_and_symbol_setup at src/Perl6/World.nqp line 610
in any comp_unit at src/Perl6/Grammar.nqp line 1157
in any TOP at src/Perl6/Grammar.nqp line 460

@p6rt
Copy link
Author

p6rt commented Aug 16, 2016

From @lizmat

Fixed with ba20d34 , tests needed.

On 10 Jul 2016, at 22​:58, Zoffix Znet (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​128595]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128595 >

If -M includes a module that can't be found, the output is quite LTA. Not only is the module message spammed on each output, but trying to exit by typing `exit` fails (pressing ^D works).

A suggestion is to abort REPL startup if -M-included modules cannot be found.

zoffix@​VirtualBox​:~$ perl6 -MFoo
Couldn't load Rakudo REPL.pm​: Could not find Foo at line 1 in​:
/home/zoffix/.perl6
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6
CompUnit​::Repository​::AbsolutePath<76770752>
CompUnit​::Repository​::NQP<68716568>
CompUnit​::Repository​::Perl5<68716608>
Falling back to nqp REPL.

exit
Could not find Foo at line 1 in​:
/home/zoffix/.perl6
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/vendor
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6
CompUnit​::Repository​::AbsolutePath<76770752>
CompUnit​::Repository​::NQP<68716568>
CompUnit​::Repository​::Perl5<68716608>
in any load_module at src/Perl6/World.nqp line 1190
in any do_pragma_or_load_module at src/Perl6/World.nqp line 1120
in any loading_and_symbol_setup at src/Perl6/World.nqp line 610
in any comp_unit at src/Perl6/Grammar.nqp line 1157
in any TOP at src/Perl6/Grammar.nqp line 460

@p6rt
Copy link
Author

p6rt commented Aug 16, 2016

From @zoffixznet

Tests added in Raku/roast@8fa90454e3

@p6rt
Copy link
Author

p6rt commented Aug 16, 2016

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

@p6rt p6rt closed this as completed Aug 16, 2016
@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better testneeded labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded
Projects
None yet
Development

No branches or pull requests

1 participant