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
compile to jar files / moarvm files (without revealing original source code) #5756
Comments
From dataf5l@gmail.comI want my clients to be able to run jar files The program: my $num = (1..100).pick; my $guess_count = 0; loop { my $guess = prompt("guess"); if $guess == $num { say "Well done"; last; } if $guess > $num { say "Lower"; } if $guess < $num { say "Higher"; } if $guess_count == 7 { say "you suck!"; last; } $guess_count++; } the compilation command: perl6 --target=jvm --output=guess.jar guess.p6 the result: ===SORRY!=== java.lang.NullPointerException The version: This is Rakudo version 2016.10-9-g906719c built on JVM implementing Perl 6.c. I think the error message is less than awesome. Felipes-MacBook-Pro:backend2 a$ perl6 --stagestats --target=jvm Stage start : 0.000 Stage parse : 3.405 Stage syntaxcheck: 0.001 Stage ast : 0.001 Stage optimize : 0.140 Stage jast : 0.395 Stage classfile : 0.081 Stage jar : 0.000 Stage jvm : 0.006 ===SORRY!=== java.lang.NullPointerException Felipes-MacBook-Pro:backend2 a$ |
From @lizmatWhat happens if you add --ll-exception to the command line?
|
The RT System itself - Status changed from 'new' to 'open' |
From dataf5l@gmail.comperl6 --target=jvm --ll-exception --output=guess.jar guess.p6 java.lang.NullPointerException in command_eval (gen/jvm/stage2/NQPHLL.nqp:1217) in command_eval (src/Perl6/Compiler.nqp:27) in command_line (gen/jvm/stage2/NQPHLL.nqp:1181) in MAIN (gen/jvm/main.nqp:47) in <mainline> (gen/jvm/main.nqp:38) in (gen/jvm/main.nqp) On Tue, Oct 18, 2016 at 4:43 PM, Elizabeth Mattijsen via RT <
|
From @peschwaOn Tue Oct 18 18:07:05 2016, dataf5l@gmail.com wrote:
The feature you're asking for does not exist at the moment. You can get the precompiled compilation unit of a Perl 6 program as a .jar with C<--target=jar>, but that doesn't help you, because it a compilation unit that can be understood by a Rakudo executable, not a jar file that can be understood by any JVM. The file at [1] is a shell script that includes the step that will eventually be integrated into the perl6 binary to generate a self-contained jar file from Perl 6 code, albeit in the simplest way possible. That is, bundle the whole interpreter and make that run a predefined compilation unit. There is a corresponding Rakudo branch Note though that the branch hasn't been updated in quite a while and might not necessarily merge cleanly against current HEAD. [1] https://github.com/perl6/nqp/blob/standalone-jar/tools/jvm/one-jar-script.sh |
From dataf5l@gmail.comThank you for the prompt response. I'll review the JVM script provided, it may run! Since the feature isn't finished, is there a way to generate a MOAR file I or is this an unreasonable expectation? On Wed, Oct 19, 2016 at 12:00 PM, Pepe Schwarz via RT <
|
From @zoffixznetThere are plans to make that a possibility eventually, but as far as I know that's not a priority of what the developers are focusing on at the moment. On Wed, 19 Oct 2016 13:55:47 -0700, dataf5l@gmail.com wrote:
|
@zoffixznet - Status changed from 'open' to 'resolved' |
@zoffixznet - Status changed from 'resolved' to 'open' |
From dataf5l@gmail.comThis breaks my heart, since I was planning on delivering a compiled binary Is there a way to compile using MOARVM and build a "moarvm" file, similar Is this planned for this year? On Tue, Nov 8, 2016 at 12:35 PM, Zoffix Znet via RT <
|
Migrated from rt.perl.org#129909 (status was 'open')
Searchable as RT129909$
The text was updated successfully, but these errors were encountered: