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

[JVM] Module shadowed after importing another module (precompilation involved) #3790

Open
usev6 opened this issue Jul 12, 2020 · 0 comments
Open
Labels
JVM Related to Rakudo-JVM precompilation

Comments

@usev6
Copy link
Contributor

usev6 commented Jul 12, 2020

The Problem

I tried to get Zef to work on the JVM backend (with the changes from Raku/nqp#643 applied), but ran into the following error:

$ rakudo-j -I. -Ilib bin/zef install .
Could not find symbol '&Client' in 'Zef'

I tried to golf the problem down and arrived at this:

$ cat lib/Foo.pm6 
class Foo { }
$ cat lib/Foo/A.pm6 
use Foo::B;
use Foo::C;
class Foo::A { my $b = Foo::B.new }
$ cat lib/Foo/B.pm6 
use Foo;
class Foo::B { }
$ cat lib/Foo/C.pm6 
#no precompilation;
use Foo;
class Foo::C { }
$ rakudo-j -Ilib -e 'use Foo::A; my $a = Foo::A.new'
===SORRY!=== Error while compiling -e
Could not find symbol '&B' in 'Foo'
at -e:1

If I uncomment no precompilation for Foo::C the error goes away:

$ sed -i -e '/^#no precompilation;/ s/^#//' lib/Foo/C.pm6
$ rakudo-j -Ilib -e 'use Foo::A; my $a = Foo::A.new'
$

Environment

  • Operating system: FreeBSD 11.3-RELEASE-p6
  • Compiler version (perl6 -v or raku -v): This is Rakudo version 2020.06-60-g07009cc0d built on JVM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM precompilation
Projects
None yet
Development

No branches or pull requests

1 participant