Closed hythm7 closed 2 years ago
Output with --ll-exception
:
raku --ll-exception -I 'CompUnit::Repository::Staging#name(home)#/tmp/test/staging' /tmp/test/raku-File-Temp/t/01-load.t
No such method 'need' for invocant of type 'Any'. Did you mean any of
these: 'end', 'head', 'new'?
at SETTING::src/core.c/Exception.pm6:62 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:throw)
from gen/moar/Metamodel.nqp:60 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Metamodel.moarvm:throw_or_die)
from gen/moar/BOOTSTRAP/v6c.nqp:5336 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/BOOTSTRAP/v6c.moarvm:report-method-not-found)
from gen/moar/BOOTSTRAP/v6c.nqp:5311 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/BOOTSTRAP/v6c.moarvm:)
from gen/moar/World.nqp:1478 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/World.moarvm:load_module)
from gen/moar/World.nqp:1428 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/World.moarvm:do_pragma_or_load_module)
from gen/moar/Grammar.nqp:1314 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statement_control:sym<use>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statement_control)
from gen/moar/Grammar.nqp:962 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statement)
from gen/moar/Grammar.nqp:890 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statementlist)
from gen/moar/Grammar.nqp:2213 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:package_def)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:package_declarator:sym<module>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:package_declarator)
from gen/moar/Grammar.nqp:2302 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:scoped)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:scope_declarator:sym<unit>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:scope_declarator)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:term:sym<scope_declarator>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:term)
from gen/moar/Grammar.nqp:3720 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:termish)
from gen/moar/stage2/NQPHLL.nqp:1249 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:EXPR)
from gen/moar/Grammar.nqp:3763 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:EXPR)
from gen/moar/Grammar.nqp:962 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statement)
from gen/moar/Grammar.nqp:890 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statementlist)
from gen/moar/stage2/NQPHLL.nqp:1471 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:LANG)
from gen/moar/Grammar.nqp:1342 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:FOREIGN_LANG)
from gen/moar/Grammar.nqp:838 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:comp_unit)
from gen/moar/Grammar.nqp:553 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:TOP)
from gen/moar/stage2/QRegex.nqp:2267 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/QRegex.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:2301 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:2217 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:execute_stage)
from gen/moar/stage2/NQPHLL.nqp:2252 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:run)
from gen/moar/stage2/NQPHLL.nqp:2248 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:)
from gen/moar/stage2/NQPHLL.nqp:2244 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:compile)
from gen/moar/stage2/NQPHLL.nqp:1919 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:2154 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
from gen/moar/stage2/NQPHLL.nqp:2114 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from gen/moar/Compiler.nqp:111 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:2039 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/rakudo.nqp:140 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:MAIN)
from gen/moar/rakudo.nqp:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:<mainline>)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:<main>)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:<entry>)
at SETTING::src/core.c/Exception.pm6:62 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:throw)
from SETTING::src/core.c/control.pm6:255 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:die)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:456 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:precompile)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:59 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:try-load)
from SETTING::src/core.c/CompUnit/Repository/FileSystem.pm6:89 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:)
from SETTING::src/core.c/CompUnit/Repository/FileSystem.pm6:83 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:need)
from gen/moar/World.nqp:1478 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/World.moarvm:load_module)
from gen/moar/World.nqp:1428 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/World.moarvm:do_pragma_or_load_module)
from gen/moar/Grammar.nqp:1314 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statement_control:sym<use>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statement_control)
from gen/moar/Grammar.nqp:962 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statement)
from gen/moar/Grammar.nqp:890 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:statementlist)
from gen/moar/stage2/NQPHLL.nqp:1471 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:LANG)
from gen/moar/Grammar.nqp:1342 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:FOREIGN_LANG)
from gen/moar/Grammar.nqp:838 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:comp_unit)
from gen/moar/Grammar.nqp:553 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Grammar.moarvm:TOP)
from gen/moar/stage2/QRegex.nqp:2267 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/QRegex.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:2301 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:2217 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:execute_stage)
from gen/moar/stage2/NQPHLL.nqp:2252 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:run)
from gen/moar/stage2/NQPHLL.nqp:2248 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:)
from gen/moar/stage2/NQPHLL.nqp:2244 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:compile)
from gen/moar/stage2/NQPHLL.nqp:1919 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:2154 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
from gen/moar/stage2/NQPHLL.nqp:2114 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from gen/moar/Compiler.nqp:111 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/lib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:2039 (/home/hythm/.rakubrew/versions/moar-blead/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/rakudo.nqp:140 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:MAIN)
from gen/moar/rakudo.nqp:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:<mainline>)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:<main>)
from <unknown>:1 (/home/hythm/.rakubrew/versions/moar-blead/install/share/perl6/runtime/perl6.moarvm:<entry>)
As a workaround for now, whenever there is a use lib 'lib'
in a test file, use the Staging
repository by adding the below right after:
BEGIN CompUnit::RepositoryRegistry.use-repository(CompUnit::RepositoryRegistry.repository-for-spec('CompUnit::Repository::Staging#name(home)#/tmp/test/staging'));
This terrible workaround worked for all modules that have use lib 'lib'
on their test files except for one module Test::When
which gave a different error Type check failed in binding to parameter '$current'; expected CompUnit::Repository but got Any (Any)
it's probably the same bug but Test::When
triggers it in a different way.
When commenting method short-id(--> Str:D) { 'staging' }
from Staging
class, the error disappears, this is probably because short-id
method will be called on CompUnit::Repository::Installation
, makes me think that the error is related to Staging
is a CORE
module not in rakudo core as CompUnit::Repository::Installation
for example.
@niner just wondering if you could guess or know off the top of your head what could be causing this issue.
Looks like this commit fixes the issue. I dont see the error anymore on master. @lizmat
Interesting. That was not what I was going for. Nonetheless, a nice result. So closing.
The Problem
use
ing a distribution from aCompUnit::Repository::Staging
fails with the above error if there isuse lib 'lib'
statement in the file, it createslib/.precomp
in CWD, which seems messes up precompilation.Expected Behavior
It shouldn't matter if there is a
use lib 'lib'
in the program.Actual Behavior
Fails with the above error if: 1- the program has a
use lib 'lib'
beforeuse
ing the module 2- running the program from the root directory of the distribution if any of the above not true, no error happens.Steps to Reproduce
Worth mentioning that the error happens only when loading a dependency. meaning no error happens if doing the same thing for a distribution that doesn't depend on any module. for example running:
raku -I 'CompUnit::Repository::Staging#name(home)#/tmp/test/staging' /tmp/test/p6-file-directory-tree/t/basic.t
works without error, althoughit is run from withing the root directory of the dist and it hasuse lib 'lib'
The output for the error with
RAKUDO_MODULE_DEBUG=1
Environment