Simpler local Scala install and execution

The scala-cli project is a promising tool for learners, with an explicit goal to be a simple install and run.

The current official “getting started” guide is quite elaborate and require a visit to the coursier page, which in turn directly assumes terminal knowledge etc. Overview · Coursier

@julienrf Can you perhaps share some of the joint strategy behing the efforts of Virtuslabs and Scala Center on the future of the old scala runner and the more versatile scala-cli and the cs tool? Is there a chance of consolidating all this into one single, consistent UX?

See also e.g.: Use `scl` instead of the cumbersome `scala-cli` · Discussion #351 · VirtusLab/scala-cli · GitHub

It is true that the current getting started instructions assume terminal knowledge. I didn’t think that would be an issue.

Regarding scala-cli, for now I believe it should replace the scala command-line tool, but I am not sure yet it should replace cs. I prefer going one step at a time. To be able to replace cs, I think it would have to have the ability to “install” apps (such as installing sbt), which is not on their roadmap as far as I know.

According to Under the hood | Scala CLI scala-cli already uses Coursier under the hood, so I guess it would be possible to let scala-cli install stuff by just delegating to cs. Would that be an ok solution enough so that it could “replace” cs, in the sense of being the default go-to for the getting started?

It is ok to require terminal to install but, ideally I think that there should be some hint on how to do that in practice. The coursier page is a heavy read, with no specific hints on how to do this, if you are a beginner. There are offical guides for Apple and also from Microsoft how to install windows terminal.

1 Like

See also comments in this thread:

That’s a good point!

My gut feeling is still to follow a more step by step approach (first, I think it would be extremely valuable to replace the existing scala interpreter with the scala-cli run interpreter), but you’re right that adding support for scala-cli install … seems to be low-hanging fruit. I think we should discuss that with the Scala-CLI team.

Yes, good idea. Do you want me to initiate in such discussions, or do you already have some regular meetings between Scala Center and Virtuslabs?

Would it be ok for you to initiate this discussion in the Scala CLI repo?

Sure. I’ll investigate if existing threads there are suitable (or else start a new thread) and invite you there.

1 Like

Now here: What's left before scala-cli can be introduced on the official Scala Getting Started page? · Discussion #905 · VirtusLab/scala-cli · GitHub
Ok, like that?

Yes, thank you Björn!