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

Coursier scala3-repl launcher cannot be used as a runner #12811

Closed
ShapelessCat opened this issue Jun 13, 2021 · 6 comments
Closed

Coursier scala3-repl launcher cannot be used as a runner #12811

ShapelessCat opened this issue Jun 13, 2021 · 6 comments

Comments

@ShapelessCat
Copy link
Contributor

Compiler version

3.0.0

Minimized example

Follow the official document Scala 3 Book, run the simple "Hello, world" example through scala3-repl.

  1. In the file Hello.scala, write
    @main def hello = println("Hello, world!")
  2. scala3-compiler Hello.scala
  3. scala3-repl hello

The scala3-repl was installed through Coursier, as suggested by the official webpage Download Scala 3

Output

NO output.
I see the scala3-repl get into the interactive mode directly without any output.

Expectation

I expect to see the "Hello, wrold!" output, the same as in Scala 2.

@ShapelessCat ShapelessCat changed the title REPL enter interactive mode directly without running the provided source code REPL enter interactive mode directly without running the provided .scala file that contains a main function Jun 13, 2021
@ShapelessCat ShapelessCat changed the title REPL enter interactive mode directly without running the provided .scala file that contains a main function REPL enter interactive mode directly without running the provided code Jun 13, 2021
@ShapelessCat ShapelessCat changed the title REPL enter interactive mode directly without running the provided code REPL enter interactive mode directly without running the specified source file Jun 13, 2021
@griggt griggt changed the title REPL enter interactive mode directly without running the specified source file Coursier scala3-repl launcher cannot be used as a runner Jun 13, 2021
@romanowski
Copy link
Contributor

The core of the problem is that coursier installs repl and compiler as java applications and do not include bash scripts that contains logic that switch repl to execute compiled scala code rather then start repl.

@bjornregnell
Copy link
Contributor

See also #12502 and scala/scala-lang#1248

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...)

@smarter
Copy link
Member

smarter commented Jun 16, 2021

Please open coursier issues at github.com/coursier/coursier, there's nothing we can do about it in this repository.

@bjornregnell
Copy link
Contributor

bjornregnell commented Jun 16, 2021

Thanks @smarter Filked now here coursier/coursier#2058

I still think the official home page is a problem. Where to file bugs on the scala-lang.org page?

@smarter
Copy link
Member

smarter commented Jun 16, 2021

@bjornregnell
Copy link
Contributor

Aha. Then its already there: scala/scala-lang#1248

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

No branches or pull requests

6 participants