(The Scala Center team is dedicated to providing regular and transparent community updates about project plans & progress. In this forum we created a new topic category to allow quicker orientation going forward: “Scala Center Updates”. Even though all feedback is welcome, we keep the right to make executive decisions about projects we lead. Overview of all our activities can always be found at https://scala.epfl.ch/records.html)
Coursier has become a tool that every Scala developer depends on, either directly or indirectly. It packs an incredibly impressive feature set. With the addition of the cs setup functionality it’s no surprise that Coursier is becoming an increasingly popular option, not only to set up the common Scala toolchain, but also to maintain Java versions and to launch applications. Coursier has transitioned from a power-user tool to a tool that is now possibly the first Scala tool encountered by a newcomer to the language.
With that in mind, contrasting the user experience with other common tools used for similar purposes, Coursier is lagging behind. With an overwhelming help menu (see cs java -h), varying installation instructions found on the Scala website, and unclear details about what exact versions and specific launchers (sbt for example) are being installed, it brings unnecessary confusion to the Getting Started experience.
<intro from the SCP-026 Solify Getting Started with Coursier>
One of the main blockers to actively recommend coursier to newcomers is that it does not install the original distribution of some software, in particular sbt and the Scala 3 REPL launcher. Instead, it installs a custom distribution that better fits its model. This comes at a cost: it duplicates the amount of maintenance that is required when new features are developed, or, more often, it causes desynchronization between the various distributions. The latter has another consequence: the maintainers and other expert users of these software cannot help beginners to troubleshoot issues, since environmental factors differ.
Another issue is that, as software for beginners, its help menu is overwhelming. coursier is a powerful tool with many configuration options, but most of them should not be shown to beginners by default.
In order to address these issues, at the Scala Center we will work on the following milestones.
M1, Oct 15 - Fix the binary version of Scala 3 artifacts as seen by coursier
See coursier#2194. This is a simple issue, but which currently prevents resolution of a number of artifacts when using Scala 3 applications through the coursier launcher.
M2, Nov 5 - Install the original distribution of sbt, Scala 3 runner
Initial work to support the installation of original distributions (in general), was done by Alexandre Archambault in coursier#2188 and coursier#2207. We will build on this foundation to use the official distribution of software installed by coursier, when they have one, and when its behavior differs from the one installed by coursier. In particular, for sbt and the Scala 3 runners.
M3, Nov 12 - Document running/installing specific versions of software
This is simple documentation work, but is a prerequisite for the following milestone.
M4, Nov 26 - Merge the setup of Scala 3 apps with Scala 2 apps
Currently, coursier installs Scala 2 core applications (such as the compiler and REPL) and Scala 3 applications as distinct applications, with distinct names. This causes confusion when following tutorials or other sources of documentation for Scala 3, as the names of the commands are not the same, and by default are associated with Scala 2 only.
This milestone consists in merging Scala 2 apps and Scala 3 apps as a single set of applications, where the appropriate version is nothing more than a different version of the software. As a side effect, this means that Scala 3 will be installed by default (since its version number is higher). Users will be able to select Scala 2 by forcing the version of the software, which we will have documented in M3.
M5, Dec 10 - Improve the help menu
As previously mentioned, the help menu of coursier is overwhelming to a newcomer. We will adapt it to use a layered approach, where only frequently used options are shown by default. Specific options will request help for the advanced/rarely used options. This is similar to the way -X, -Y and -W options work in the scalac command.
In addition, we will better document what each of the top-level commands does, such as “setup” or “launch”.
M6, Dec 24 - Revisit the Getting Started pages on the official website
With all the above milestones taken care of, we will be ready to actively recommend coursier as the official way to install Scala and related software. We will therefore revisit the Getting Started and Download pages of the website to reflect that new reality.