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

be/jvm: For -jar and -classes backends, fix arguments and include cmd as args[0] #2549

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

fridis
Copy link
Member

@fridis fridis commented Feb 13, 2024

The script created for -jar and -classes did not propagate the command name as part of the arguments, so the first argument was falsely taken as the command name.

With this patch, the command name is passed explicitly via a property fuzion.command, which will be set to the script file in case of -jar/-classes targets and to the fz command in case of the -jvm target.

… as args[0]

The script created for -jar and -classes did not propagate the command name as
part of the arguments, so the first argument was falsely taken as the command
name.

With this patch, the command name is passed explicitly via a property
`fuzion.command`, which will be set to the script file in case of -jar/-classes
targets and to the `fz` command in case of the `-jvm` target.
@maxteufel maxteufel merged commit 85b0280 into main Feb 13, 2024
5 checks passed
@maxteufel maxteufel deleted the jvm_fix_arg0_for_jar_and_classes branch February 13, 2024 12:59
@maxteufel
Copy link
Collaborator

This broke idiom 60:

$ ./bin/check_example_jvm.sh idioms/src/idiom60ex2.fz 
RUN idioms/src/idiom60ex2.fz 2c2
< arg#0 is ex60
---
> arg#0 is /nix/store/27wd538wh2md4940zisai4yh840hi36x-openjdk-21+35/lib/openjdk/bin/java
*** FAILED out on idioms/src/idiom60ex2.fz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants