I use Scala for teaching students. Today, for a third student, we attempted to install the scala suite of tools using Coursier. We opened PowerShell as administrator and pasted the steps detailed here Installation · Coursier
For every prompt, such as the ones asking if we would like to add whatever to his PATH, he typed Y.
At the end, running sbt worked, so we closed his Powershell and opened up CMD instead as that’s his preferred cli. sbt new scala/scala3.g8 resulted in “sbt is unrecognized command”. We assume “okay, it must only work on powershell”, so we re-opened Powershell and tried it there; same result. Even in Powershell, sbt is now unrecognized, as if the PATH for powershell had been totally reset and forgotten about the installation we had just successfully finished 1 minute ago.
After this failing for a third student on both Windows and Unix, I think I am going to strictly avoid Coursier and only use Chocolatey and SDKMAN/Homebrew for getting scala stuff on student’s computer for now. With students, the installation process needs to be a simple command paste requiring near zero configuration to avoid friction in a classroom setting. Not sure what’s going on, just providing feedback.
There are issues but the developers may not have any idea, especially on Windows, since developers rarely use Windows. Please report especially if it’s reproducible.
There are some plans to streamline the installation process, making it available on Chocolatey, SDKMAN, etc.
But I agree that currently cs is quite lacking / buggy and sticking to SDKMAN is probably best.
I sometimes had an issue that I needed to restart the machine or at least relog for the changes in PATH to be noticed, I wonder if that is the case here. And if that is the case, I wonder how do the package managers make that work, maybe in their case the PATH is already changes?
I have had similar issues with my students on Windows. But a restart often helps. I’m curious to know if your issues are resolved with a restart after installing cs? @SJohn
I am trying to maintain coursier a bit, but currently I am unable to commit to larger improvement unless something super critical happens. I might have some time in the future, but I can’t promise anything.