-
Notifications
You must be signed in to change notification settings - Fork 132
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
Make cs setup include scala-cli #904
Comments
Just to add my two cents. I personally find this a bit odd that my build tool (scala-cli) would be installing other tools, like sbt or scalafmt. I personally wouldn't want this, but understand the desire to have something easier for people to get started on. Ever since we created "Solidify Getting Started with Coursier" in here the goal was to ensure an easy start with coursier. Why is it not sufficient that I sort of feel like we started to chase the idea of making coursier a solid way to get started, and are now considering just stopping and backing another horse to get started. I really love |
I think there are 2 aspects here and I got a feeling that we mixing them up. So we have:
I think scala-cli should not double what coursier offers but on the other hand, I think installing scala-cli (or scala in the future) run should also install couriser. Coursier is amazing and the idea that it should be the entry point to Scala ecosystem is good however I think that a need to install another tool to install Scala will be confusing to newcomers - that is why we think this 'bundle install' is a way forward. |
Sure, this makes sense. |
Thank you @ckipp01 for raising the need for clarification. Scala-cli and Coursier are both amazing tools and they benefit from each other, and my phrasing of the topic of this issue is perhaps a bit misleading as I meant to discuss how scala-cli can build on cs to do the things needed by a new-comer to Scala. If a beginner should only install one thing to run their first Scala program then a runner is more important than an installer, so a one-click install would be great. If scala-cli installs cs without any extra effort then professionals and beginners are both happy :) This issue is a step towards making the official getting-started page suitable for both pure beginners and experienced professionals, which is not an easy job and requires careful thinking about various user types use cases... |
What do you all think about moving (or duplicating in a first time) the
The only minor issue I see with this is that |
I think that duplicating the cs setup capability in scala-cli seems like a great idea!
So I would still have to do Or could coursier detect that it didn't install scala-cli and explain that scala-cli should be updated manually using Perhaps the user's ability to "talk" to underlying coursier could be expanded, by also duplicating other useful commands like install and update? That might perhaps be a road towards a (partly) unified user experience? |
Anyway, any minor install quirks across scala-cli + cs is not so much a problem, and getting the setup capability would greatly simply my students lives as they move from scala-cli simple project, towards trying out a "real" build tool. |
@alexarchambault It is unclear to me how those two items below would work in this order:
How would
I think if |
The solution described by @alexarchambault seems a bit odd to me. It makes things easier for the Scala beginners, they only see It is also a bit confusing. Because it can be interpreted as: 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
|
I agree with @adpi2 that every extra concept increases the risk of confusion. Having only one thing that can do it all is much easier, than for a beginner having to understand what scala-cli does and does not and what cs does and does not. So if merging scala-cli and cs is in scope of the roadmap and nearby releases then I'm very happy with that. But if the solution by @alexarchambault is needed as a temprorary work-around for making it possible to get scala-cli to become the official installer sooner rather than later (preferrably under the name (I'm currently creating/updating teaching material for the fall semester, so I'm very interested in that the simple-beginner-use-case is determined as soon as possible so my material can go in print before summer. I guess there are more teachers than me that are prepping the fall semester currently...) |
I really like @adpi2's first proposal because:
@romanowski Wouldn't this be solved if |
Well, I'm fine with keeping cs for other stuff, but I don't want beginners having to install more than one thing. So first I agree that help can be daunting if too long, but it also depends how the help is structured and I think that if you e.g. never use a certain capability that help-text does not have to be shown upfront, but as subhelp when you need it. So if we keep cs and scala-cli as separate tools, then I think scala-cli should be the official getting-started experience, preferrably named |
If the official start is |
Ideally there should be a default one-click install for each platform and then you are good to go with |
As a comparison, there is only one installer for Node but it installs two things We can do something similar. There is only one installer for Scala and it installs two things So ultimately one could write a Scala programming course without mentioning That being said, I don't have a strong preference between When I am writing the documentation of some tool, I want to assume that
Instead of:
|
@adpi2 Aha, yes, similar to Node, if the one-click install installs both |
Thanks for your feedback everyone. So it seems there's a consensus on installing both cs and scala-cli together as much as possible (it's something we had also discussed internally at VirtusLab). @lwronski (and a bit myself) started to think about some practical matters about this. Packaging cs and scala-cli together is fine, but updates can be a problem, as both tools are not released together. To work around that, a way would be to package cs and scala-cli together in graphical installers (so MSI on Windows, and pkg on macOS), and keep them separate in CLI installation instructions, but suggest users to install both. Scala CLI can grab the latest cs launcher or the one that Scala CLI is currently using (in its CI say), and put it in Windows MSI and macOS pkg. For CLI methods, we can make sure that scala-cli and cs both have packages for the same platforms (rpm, deb, sdkman, etc.), and suggest users to install both. For that to work, we need to ensure that the coursier CI builds the same kind of packages as Scala CLI, which could be achieved via scala-packager and maybe some shared Mill plugins too. Then instructions could be updated - the manual ones could look like
This might also require pushing coursier packages to the same RPM or deb repository as Scala CLI. |
Having both Also pkg om macos is nice! But also sdkman and brew are popular for macos people. And sdkman is increasingly popular för linux people, but deb is of course very popular by many. So it would be nice if all stuff points to both scala-cli and cs together. See also #981 |
To me this sounds more complicated than it should be. The coursier website says:
What are the issues with this approach? |
If so, there are still two concepts to understand and deal with by a beginner programmer (coursier and scala-cli). I'd like a single click download for each platform, preferably defaulting to a platform-specific installer such as msi for windows, etc. (But with other options visible aside.) And with the approach you suggest, if I understand correctly, there are still two steps if you must first install Coursier and then do |
|
+1. If the installation of coursier is considered too complicated that's a separate issue. |
Well, the
I agree that it is a separate issue. But it is not the only issue: Assume that you want to install Scala and that you are a beginner programmer. Currently:
Compare that to how it could be:
Even if there is a thing called Coursier, which can do installation and stuff, that does not have to be an upfront exposed concept and an action step for a beginner (who does not initially care about coursier, sbt and what not). I think the Download and install of Anyway, I think the current getting-started-page is much better now ❤️ than when Scala 3 was released. The main thing left as I see it is to consolidate the several different concepts currently available into a single |
It used to be directly the exe, rather than a zip with an exe within. I don't know why that changed. It should be reverted. An exe installer is perfectly fine on Windows. It doesn't have to be an msi. In either case you double-click on it. Many software are distributed as exe installers. |
I started this issue after discussions with @julienrf on what was neeed to:
@julienrf suggested a stepwise approach including resolving what installs what :). If |
I just tested the new https://www.scala-lang.org/download/ on a clean Windows 10 machine and it worked like a charm! ❤️ @bishabosha I got there by clicking on "Install" on top of the scala-lang home page. I could double click on the zip for Windows and after download and then I could actually double click on the exe without even unpacking the zip. Now I got I found these issues:
|
Found another issue with the official install page: @bishabosha @julienrf
I propose to change the heading to Install Scala with Coursier (Recommended)" and the body text to :
I removed "from a command line" as this is not so for Windows with the zip/exe/msi. (Or do you want me to report these issues of the install page elsewhere?) |
Perhaps we should change the topic of this issue to "Make Including scala-cli in cs setup can be done prior to the potential/eventual promotion of |
Link to issue now also in the coursier repo: |
I think this was fixed by coursier/coursier#2415? |
Yes! 🎉 |
I agree that users should be given the possibility to install Scala CLI via Yet, should it be the only way of installing it? (This also applies to It's still quite handy for some users to be able to install For that to work well, we need to be sure that:
We have some ideas for how to add support for the first two points. For the third one, it should be a matter of moving the packaging logic of Scala CLI to a Mill plugin or Scala scripts living in a separate repository. |
We can organize a meeting to discuss that, if that can help settle this. |
I'm happy to join a meeting. bjorn.regnell@cs.lth.se |
I've just merged scala/docs.scala-lang#2403 to list scala-cli as being installed by cs setup in the getting started guide. (no demo yet though) |
I agree, and I think |
I agree it would be nice if we were able to automatically run I'm not sure how to reconcile these two points. Maybe we could ensure that But the coursier cache would still be per user at first, so every user on the current machine would download and cache everything for themselves. This might be addressed by… maybe allowing users to pick things from a global cache managed by root. It's a bit uncertain, and I'm not sure what kind of issue could arise from that approach… |
Related to #686 |
It might be nice generally to make scala-cli available through native package managers. But having multiple ways to get the same thing comes with a cost (maintenance, troubleshooting). I think it's better to focus on "only way of installing it" for scala-cli, at least initially. I really don't think |
Related to: scala/improvement-proposals#46 |
I guess this can be closed now as
|
(*) 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 officialscala
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.
The text was updated successfully, but these errors were encountered: