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

Explain how to run a Scala 3 program compiled on the command line #1250

Closed
lrytz opened this issue Jun 4, 2021 · 8 comments
Closed

Explain how to run a Scala 3 program compiled on the command line #1250

lrytz opened this issue Jun 4, 2021 · 8 comments

Comments

@lrytz
Copy link
Member

lrytz commented Jun 4, 2021

Cross-posting from gitter before I can't find my own message anymore.

https://www.scala-lang.org/download/scala3.html suggests cs install scala3-compiler and cs install scala3-repl to install, and scala3-compiler test.scala to compile something on the command line. But it doesn't say how to run the compiled program.

If I have @main def hello(): Unit = ..., then scala3-repl hello just opens the REPL. java -cp $(cs fetch -p scala3-repl):. hello works, is there anything simpler?

@lrytz
Copy link
Member Author

lrytz commented Jun 16, 2021

Duplicate of scala/scala3#12811

@lrytz lrytz marked this as a duplicate of scala/scala3#12811 Jun 16, 2021
@lrytz lrytz closed this as completed Jun 16, 2021
@bjornregnell
Copy link
Contributor

This is a showstopper for me to use cs in my teaching. And there is no .msi for Scala 3 so I'm more or less stuck (manually unpackaging a zip and going into environment variables to fiddle with path etc in Windows is not very attractive beginner programmer user experience...)

@bjornregnell
Copy link
Contributor

See also scala/scala3#12502

@bjornregnell
Copy link
Contributor

See also #1248

@bjornregnell
Copy link
Contributor

@lrytz Is this really a duplicate of scala/scala3#12811?
A runner does not have to depend on cursier, and the download page should explain how to run a Scala 3 program IMHO.

@lrytz
Copy link
Member Author

lrytz commented Jun 21, 2021

I closed this to avoid having too many tickets for the same underlying issue. I assume when the coursier issue (coursier/coursier#2058) gets fixed the website will be updated too. But I we can re-open it if desired.

Note that the scala bash script from the archive on https://github.com/lampepfl/dotty/releases/tag/3.0.0 acts as runner script or repl launcher, depending on the arguments. But given how low it appears on the download page I don't think anyone is using that.

@bjornregnell
Copy link
Contributor

I'm using it :)

Ok; good to reduce overlap among issues.

This also depends on if cs can be the official thing that can meet "all" use cases...

I guess one reason for the low usage could be the lack of easy install of Scala 3 on Windows. Do you have some info on the download stats of the Scala 2 .msi?

@lrytz
Copy link
Member Author

lrytz commented Jun 22, 2021

I'm using it :)

Nice, sorry about my skepticism :)

download stats of the Scala 2 .msi?

I didn't manage to get these stats unfortunately. The files are hosted on a S3 bucket at lightbend, and we're not currently processing the access logs.

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

No branches or pull requests

2 participants