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

Owner: Nobody
Requestors: david.warring <david.warring [at] gmail.com>
Cc:
AdminCc:

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



Subject: Rkaudo precompilation bug on all backends
Download (untitled) / with headers
text/plain 1.8k
Consider three simple classes: lib/A.pm: class A {} lib/A/B/C1.pm: class A::B::C1 { use A; method foo(){} } lib/A/B/C2.pm: class A::B::C2 { use A; method foo(){} } % perl6-m --version This is perl6 version 2014.11-9-g3bbf7bc built on MoarVM version 2014.11-17-g972d95b % perl6-m --target=mbc --output=blib/lib/A.pm.moarvm lib/A.pm % perl6-m --target=mbc --output=blib/lib/A/B/C1.pm.moarvm lib/A/B/C1.pm % perl6-m --target=mbc --output=blib/lib/A/B/C2.pm.moarvm lib/A/B/C2.pm % perl6-m -I blib/lib -e'use A::B::C1; use A::B::C2; say A::B::C1.^methods' Could not find symbol '&C1' in method <anon> at src/gen/m-CORE.setting:13777 in any find_method_fallback at src/gen/m-Metamodel.nqp:2725 in any find_method at src/gen/m-Metamodel.nqp:988 in block <unit> at -e:1 With parrot: % perl6-p -I blib/lib --target=pir --output=blib/lib/A.pm.pir lib/A.pm % perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C1.pm.pir lib/A/B/C1.pm % perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C2.pm.pir lib/A/B/C2.pm % perl6-p -I blib/lib -e'use A::B::C1; use A::B::C2; say A::B::C1.^methods' Could not find symbol '&C1' in method <anon> at gen/parrot/CORE.setting:13717 in any find_method_fallback at gen/parrot/Metamodel.nqp:2795 in any find_method at gen/parrot/Metamodel.nqp:989 in any at gen/parrot/BOOTSTRAP.nqp:1708 in block <unit> at -e:1 and with JVM backend. % perl6-j --target=jar --output=blib/lib/A.pm.jar lib/A.pm % perl6-j --target=jar --output=blib/lib/A/B/C1.pm.jar lib/A/B/C1.pm % perl6-j --target=jar --output=blib/lib/A/B/C2.pm.jar lib/A/B/C2.pm % perl6-j -I blib/lib -e'use A::B::C1; use A::B::C2; say A::B::C1.^methods' Could not find symbol '&C1' in method <anon> at gen/jvm/CORE.setting:13700 in any find_method_fallback at gen/jvm/Metamodel.nqp:2714 in any find_method at gen/jvm/Metamodel.nqp:988 in any at gen/jvm/BOOTSTRAP.nqp:1700 in block <unit> at -e:1
Subject: A.tgz
Download A.tgz
application/x-compressed 250b

Message body not shown because it is not plain text.

Tests added to S10-packages/precompilation.t On Sat Nov 22 10:17:51 2014, david.warring wrote: Show quoted text
> Consider three simple classes: > > lib/A.pm: > class A {} > > lib/A/B/C1.pm: > class A::B::C1 { use A; method foo(){} } > > lib/A/B/C2.pm: > class A::B::C2 { use A; method foo(){} } > > % perl6-m --version > This is perl6 version 2014.11-9-g3bbf7bc built on MoarVM version > 2014.11-17-g972d95b > % perl6-m --target=mbc --output=blib/lib/A.pm.moarvm lib/A.pm > % perl6-m --target=mbc --output=blib/lib/A/B/C1.pm.moarvm > lib/A/B/C1.pm > % perl6-m --target=mbc --output=blib/lib/A/B/C2.pm.moarvm > lib/A/B/C2.pm > % perl6-m -I blib/lib -e'use A::B::C1; use A::B::C2; say > A::B::C1.^methods' > Could not find symbol '&C1' > in method <anon> at src/gen/m-CORE.setting:13777 > in any find_method_fallback at src/gen/m-Metamodel.nqp:2725 > in any find_method at src/gen/m-Metamodel.nqp:988 > in block <unit> at -e:1 > > With parrot: > > % perl6-p -I blib/lib --target=pir --output=blib/lib/A.pm.pir lib/A.pm > % perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C1.pm.pir > lib/A/B/C1.pm > % perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C2.pm.pir > lib/A/B/C2.pm > % perl6-p -I blib/lib -e'use A::B::C1; use A::B::C2; say > A::B::C1.^methods' > Could not find symbol '&C1' > in method <anon> at gen/parrot/CORE.setting:13717 > in any find_method_fallback at gen/parrot/Metamodel.nqp:2795 > in any find_method at gen/parrot/Metamodel.nqp:989 > in any at gen/parrot/BOOTSTRAP.nqp:1708 > in block <unit> at -e:1 > > and with JVM backend. > > % perl6-j --target=jar --output=blib/lib/A.pm.jar lib/A.pm > % perl6-j --target=jar --output=blib/lib/A/B/C1.pm.jar lib/A/B/C1.pm > % perl6-j --target=jar --output=blib/lib/A/B/C2.pm.jar lib/A/B/C2.pm > % perl6-j -I blib/lib -e'use A::B::C1; use A::B::C2; say > A::B::C1.^methods' > Could not find symbol '&C1' > in method <anon> at gen/jvm/CORE.setting:13700 > in any find_method_fallback at gen/jvm/Metamodel.nqp:2714 > in any find_method at gen/jvm/Metamodel.nqp:988 > in any at gen/jvm/BOOTSTRAP.nqp:1700 > in block <unit> at -e:1
Download (untitled) / with headers
text/plain 2.5k
This could be a bit of a non-issue in Perl 6.c, which handles precompilation and gets this right: $ perl6 --version This is Rakudo version 2015.12-72-g3ea4dff built on MoarVM version 2015.12 implementing Perl 6.c. $ $ perl6-m -I lib -e'use A::B::C1; use A::B::C2; say A::B::C1.^methods' (foo) On Sat Nov 22 12:00:26 2014, david.warring wrote: Show quoted text
> Tests added to S10-packages/precompilation.t > > On Sat Nov 22 10:17:51 2014, david.warring wrote:
> > Consider three simple classes: > > > > lib/A.pm: > > class A {} > > > > lib/A/B/C1.pm: > > class A::B::C1 { use A; method foo(){} } > > > > lib/A/B/C2.pm: > > class A::B::C2 { use A; method foo(){} } > > > > % perl6-m --version > > This is perl6 version 2014.11-9-g3bbf7bc built on MoarVM version > > 2014.11-17-g972d95b > > % perl6-m --target=mbc --output=blib/lib/A.pm.moarvm lib/A.pm > > % perl6-m --target=mbc --output=blib/lib/A/B/C1.pm.moarvm > > lib/A/B/C1.pm > > % perl6-m --target=mbc --output=blib/lib/A/B/C2.pm.moarvm > > lib/A/B/C2.pm > > % perl6-m -I blib/lib -e'use A::B::C1; use A::B::C2; say > > A::B::C1.^methods' > > Could not find symbol '&C1' > > in method <anon> at src/gen/m-CORE.setting:13777 > > in any find_method_fallback at src/gen/m-Metamodel.nqp:2725 > > in any find_method at src/gen/m-Metamodel.nqp:988 > > in block <unit> at -e:1 > > > > With parrot: > > > > % perl6-p -I blib/lib --target=pir --output=blib/lib/A.pm.pir lib/A.pm > > % perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C1.pm.pir > > lib/A/B/C1.pm > > % perl6-p -I blib/lib --target=pir --output=blib/lib/A/B/C2.pm.pir > > lib/A/B/C2.pm > > % perl6-p -I blib/lib -e'use A::B::C1; use A::B::C2; say > > A::B::C1.^methods' > > Could not find symbol '&C1' > > in method <anon> at gen/parrot/CORE.setting:13717 > > in any find_method_fallback at gen/parrot/Metamodel.nqp:2795 > > in any find_method at gen/parrot/Metamodel.nqp:989 > > in any at gen/parrot/BOOTSTRAP.nqp:1708 > > in block <unit> at -e:1 > > > > and with JVM backend. > > > > % perl6-j --target=jar --output=blib/lib/A.pm.jar lib/A.pm > > % perl6-j --target=jar --output=blib/lib/A/B/C1.pm.jar lib/A/B/C1.pm > > % perl6-j --target=jar --output=blib/lib/A/B/C2.pm.jar lib/A/B/C2.pm > > % perl6-j -I blib/lib -e'use A::B::C1; use A::B::C2; say > > A::B::C1.^methods' > > Could not find symbol '&C1' > > in method <anon> at gen/jvm/CORE.setting:13700 > > in any find_method_fallback at gen/jvm/Metamodel.nqp:2714 > > in any find_method at gen/jvm/Metamodel.nqp:988 > > in any at gen/jvm/BOOTSTRAP.nqp:1700 > > in block <unit> at -e:1
> >
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 746b
On Sat Jan 02 13:14:43 2016, david.warring wrote: Show quoted text
> This could be a bit of a non-issue in Perl 6.c, which handles > precompilation and gets this right: > > $ perl6 --version > This is Rakudo version 2015.12-72-g3ea4dff built on MoarVM version > 2015.12 > implementing Perl 6.c. > $ $ perl6-m -I lib -e'use A::B::C1; use A::B::C2; say > A::B::C1.^methods' > (foo)
This still looks good. The test in S10-packages/precompilation.t doesn't pass, though: Show quoted text
> not ok 31 - RT123276# TODO RT \#123276 > > # Failed test 'RT123276' > # at t/spec/S10-packages/precompilation.rakudo.moar line 120 > # expected: $["foo"] > # got: $["(foo)"]
The output $["(foo)"] looks right to me, so IMHO the test should be adjusted, probably in 6.c-errata as well.
Download (untitled) / with headers
text/plain 938b
Thanks @Christian Have fixed/unfudged the roas test in master. Closing this ticket. - David On Sun Apr 10 08:35:16 2016, bartolin@gmx.de wrote: Show quoted text
> On Sat Jan 02 13:14:43 2016, david.warring wrote:
> > This could be a bit of a non-issue in Perl 6.c, which handles > > precompilation and gets this right: > > > > $ perl6 --version > > This is Rakudo version 2015.12-72-g3ea4dff built on MoarVM version > > 2015.12 > > implementing Perl 6.c. > > $ $ perl6-m -I lib -e'use A::B::C1; use A::B::C2; say > > A::B::C1.^methods' > > (foo)
> > This still looks good. The test in S10-packages/precompilation.t > doesn't pass, though: >
> > not ok 31 - RT123276# TODO RT \#123276 > > > > # Failed test 'RT123276' > > # at t/spec/S10-packages/precompilation.rakudo.moar line 120 > > # expected: $["foo"] > > # got: $["(foo)"]
> > The output $["(foo)"] looks right to me, so IMHO the test should be > adjusted, probably in 6.c-errata as well.


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