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 flag #1214

Closed
armanbilge opened this issue Jul 28, 2022 · 1 comment · Fixed by #1347
Closed

--jvm flag #1214

armanbilge opened this issue Jul 28, 2022 · 1 comment · Fixed by #1347
Assignees

Comments

@armanbilge
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Sometimes I have a script with //> using platform "js" but I would like quickly run it on JVM to compare behavior (I work a lot on cross-compiling libraries to have identical cross-platform semantics).

Describe the solution you'd like
There are already flags --js and --native, so it seems fitting to have --jvm.

Describe alternatives you've considered
I could not specify the platform in a directive, and always pass by command-line. But directives are very convenient :)

@wleczny wleczny linked a pull request Sep 14, 2022 that will close this issue
@wleczny
Copy link
Contributor

wleczny commented Sep 16, 2022

As of v0.1.15 it will be possible to set platform via --platform option:

scala-cli Foo.scala --platform jvm

In order to use it now, use nightly version of Scala CLI:

scala-cli --cli-version nightly Foo.scala --platform jvm

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 a pull request may close this issue.

2 participants