Make cs setup include scala-cli
See original GitHub issue(*) Edit + TLDR This issue started out by discussing how scala-cli and coursier should align installation and also discussed the gettingstarted experience and the official download instructions. The consensus seem to be that coursier’s cs setup should include installation of scala-cli as a first step, before scala-cli
eventually becomes the new official scala
runner. (scroll down to the end and see conclusions)
(Initial issue kick-off text:)
Is your feature request related to a problem? Please describe. The current official Scala Getting-started-instructions are based on coursier, because cs can install stuff like sbt and what not. But scala-cli is more beginner-friendly and could replace cs as the official install method to make the getting-started experience even better.
Describe the solution you’d like Enhance scala-cli with install abilities similar to cs so that scala-cli can install stuff like sbt, sbtn, scalac, scalafmt, and other useful stuff.
Additional context scala-cli already wraps coursier under the hood so this should be a low-hanging-fruit if I have understood it correctly.
Issue Analytics
- State:
- Created a year ago
- Comments:42 (34 by maintainers)
Top GitHub Comments
To me this sounds more complicated than it should be. The coursier website says:
scala-cli
is a scala tool / application that should be installed bycs setup
(as noted before on this thread). Especially if it will become the defaultscala
at some point. Then there doesn’t need to be any packages or separate installation instructions forscala-cli
.What are the issues with this approach?
The solution described by @alexarchambault seems a bit odd to me. It makes things easier for the Scala beginners, they only see
scala-cli
and they don’t need to interact with anything else. But then if they want to discover more in the existing Scala ecosystem they need to install another thing, calledcs
, and use that thing to manage other tools likesbt
andmill
. So the path from beginner to intermediate level programmer is still quite tortuous.It is also a bit confusing. Because it can be interpreted as:
scala-cli
is the getting started tool but then if I want to become expert I mustsetup
my workspace, usecs
and the tools made available bycs
. I was writing some Scala but my environment was not yet “set up”.In order to make things equally good for beginners and experts, I think there are two ways forward, etiher 1 or 2.
1. The “one-click install” installs both
cs
andscala-cli
The “one-click install” installs
cs
and then usescs
to installscala-cli
.scala-cli
is always managed by Coursier and can be updated by Coursier. There is noscala-cli setup
.It is clear for beginners and experts what the roles of
cs
andscala-cli
are:cs
is the Scala applications managerscala-cli
is the main Scala runnerIn all our documentations and tutorials (in docs.scala-lang.org, but also in the sbt and Mill websites or any other Scala related website) we can assume that
cs
is already installed and can safely be used to installsbt
,mill
…2. Merge Coursier CLI into
scala-cli
scala-cli
is the main Scala runner and the Scala applications manager.cs
is deprecated.In terms of usage that means we will add a dozen commands into scala-cli. It will looks like this: