Skip Menu |
Report information
Id: 127883
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: ahmadz <ahmad.zawawi [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Ahmad Zawawi <ahmad.zawawi [...] gmail.com>
To: rakudobug [...] perl.org
Date: Tue, 12 Apr 2016 10:32:22 +0300
Subject: [BUG] Missing line/column number information when using a missing module
Download (untitled) / with headers
text/plain 121b

use NotFoundModule;

or

use NotInstalledModule;

produces no line/column number error information in the error message.
Download (untitled) / with headers
text/plain 1.5k
I, unsuccessfully, tried my hand and fixing this. Just adding a few comments with what little I found: This gives a bit of info on what gets called: $ perl6 -e 'EVAL "use Foo"; CATCH { default { warn .backtrace }}' in any load_module at src/Perl6/World.nqp line 986 in any do_pragma_or_load_module at src/Perl6/World.nqp line 917 in any statement_control:sym<use> at src/Perl6/Grammar.nqp line 1537 in any statement_control at ./blib/Perl6/Grammar.moarvm line 1 in any statement at src/Perl6/Grammar.nqp line 1232 in any statementlist at src/Perl6/Grammar.nqp line 1161 in block at -e line 1 If you pop open src/Perl6/World.nqp and look at load_module sub, it uses nqp to call .head.need on CompUnit::RepositoryRegistry, passing it a spec. And if you reproduce that with Perl 6 directly, then the issue described in this bug report goes away and you *do* get a line number reported: $perl6 -e 'CompUnit::RepositoryRegistry.head.need( CompUnit::DependencySpecification.new( :short-name<Foo> ) );' Could not find Foo in: /home/zoffix/.perl6 /home/zoffix/dev-p6/rakudo/install/share/perl6/site /home/zoffix/dev-p6/rakudo/install/share/perl6/vendor /home/zoffix/dev-p6/rakudo/install/share/perl6 CompUnit::Repository::AbsolutePath<140420294071144> CompUnit::Repository::NQP<140420294068392> CompUnit::Repository::Perl5<140420294065800> in block <unit> at -e line 1 No idea where to take it from here...
From: Ahmad Zawawi <ahmad.zawawi [...] gmail.com>
To: perl6-bugs-followup [...] perl.org
Date: Sat, 16 Apr 2016 20:59:46 +0300
Subject: Re: [perl #127883] [BUG] Missing line/column number information when using a missing module
Download (untitled) / with headers
text/plain 1.6k
It is now fixed on latest. Please close this ticket.

2016-04-16 9:55 GMT+03:00 Zoffix Znet via RT <perl6-bugs-followup@perl.org>:
Show quoted text
I, unsuccessfully, tried my hand and fixing this. Just adding a few comments with what little I found:

This gives a bit of info on what gets called:

  $ perl6 -e 'EVAL "use Foo"; CATCH { default { warn .backtrace }}'

  in any load_module at src/Perl6/World.nqp line 986
  in any do_pragma_or_load_module at src/Perl6/World.nqp line 917
  in any statement_control:sym<use> at src/Perl6/Grammar.nqp line 1537
  in any statement_control at ./blib/Perl6/Grammar.moarvm line 1
  in any statement at src/Perl6/Grammar.nqp line 1232
  in any statementlist at src/Perl6/Grammar.nqp line 1161
  in block  at -e line 1

If you pop open src/Perl6/World.nqp and look at load_module sub, it uses nqp to call .head.need on CompUnit::RepositoryRegistry, passing it a spec. And if you reproduce that with Perl 6 directly, then the issue described in this bug report goes away and you *do* get a line number reported:

  $perl6 -e 'CompUnit::RepositoryRegistry.head.need( CompUnit::DependencySpecification.new( :short-name<Foo> ) );'
  Could not find Foo in:
    /home/zoffix/.perl6
    /home/zoffix/dev-p6/rakudo/install/share/perl6/site
    /home/zoffix/dev-p6/rakudo/install/share/perl6/vendor
    /home/zoffix/dev-p6/rakudo/install/share/perl6
    CompUnit::Repository::AbsolutePath<140420294071144>
    CompUnit::Repository::NQP<140420294068392>
    CompUnit::Repository::Perl5<140420294065800>
  in block <unit> at -e line 1

No idea where to take it from here...



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org