-
Notifications
You must be signed in to change notification settings - Fork 325
One click install for Scala #1130
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks fine to me. Is there an easy way to preview the result?
* the [Ammonite](https://ammonite.io/) enhanced REPL | ||
* [scalafmt](https://scalameta.org/scalafmt/), the Scala formatter | ||
* the [coursier](https://get-coursier.io/) CLI, to install further Scala-based applications | ||
* the `scala` and `scalac` command-line tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add some details about how we manage specific versions of scala
and scalac
, and how to update the cs
tool itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as well.
For me it's the first time I looked at the First of all, I worry about how "magic" it all seems when just looking at the scala-lang webiste, and coursier's CLI install page that is linked. The "one click" / "one command" to set up everything is the perfect starting point, but after doing that, people will wonder
These things matter, even to begginers - a Scala beginner is not necessarily programmer beginner. Even more, Of course we cannot explain these things on the download page, but it should be clear that Things that are unclear to me after browsing through the coursier website
Finally, for me the download of the native launcher was extremely slow, i tried on mac and windows (it wasn't due to my connection). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted to using the old content with sbt instead of VS Code, until we have a proper getting started guide with VS Code.
@alexarchambault I guess @lrytz's comment is best addressed by you? |
I worry a bit if this stuff — which is still rather new — has been tested enough, on a wide enough variety of setups, to be safe enough to recommend to newcomers. (And newcomers are especially likely to just bail and disappear, rather than let us know that something isn't working for them.) Should I worry, or relax? |
At least for Windows, it works better than any of the individual tools' install mechanisms. It's really just double-clicking on the exe, and it installs everything, and then everything just works. It may not have been tested by a large number of people, true. We specifically made a call for testers for Windows a week or two ago. For other systems, I don't know. |
I agree with comments from @lrytz. I want to know what version of what is installed where … when I type |
@julienrf Hum that's not normal. Those are the generic instructions that it falls back on if it can't tell the OS. It should display something like this:
Did you get any error in the browser's console? |
No, but it seems that the os detection is not very good. It is based on Maybe that function is more robust? https://stackoverflow.com/questions/38241480/detect-macos-ios-windows-android-and-linux-os-with-js With this one, my system is correctly identified as Linux. |
@alexarchambault Would it be possible to update the documentation of coursier to answer all the questions raised by Lukas and Rob? Eventually, we need to copy parts of this documentation in the blog post and in the getting started page. |
_layouts/downloadpage.html
Outdated
<p>To check, open the terminal and type:</p> | ||
<p><code>java -version</code><span>(Make sure you have version 1.8 or 11.)</span></p> | ||
<p><i>(If you don't have it installed, download Java from <a href="https://www.oracle.com/java/technologies/javase-jdk8-downloads.html">Oracle Java 8</a>, <a href="https://www.oracle.com/java/technologies/javase-jdk11-downloads.html">Oracle Java 11</a>, or <a href="https://adoptopenjdk.net/">AdoptOpenJDK 8/11</a>. Refer <a href="https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html">JDK Compatibility</a> for Scala/Java compatiblity detail.</i></p> | ||
<h3>First, install Java, Scala, and all related command-line tools.</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the link to JDK compatibility, that was recently added in #1123, should be preserved, so new comers do not get trouble when they use latest JDK and older Scala combination.
Thanks for your comments everyone. I'd like to give some more details about the About
|
Thank you @alexarchambault for the summary! I did manage do get most of what you descibe by reading/skimming through the coursier website. For someone that's completely new to coursier, or coming from the scala download page, this kind of summary should be the first thing that's shown. A few specific questions:
|
You can pick a version with $ cs install scala:2.12.10 For now, running
We can, yes, and maybe should actually.
Good point, I guess it should, that needs to be fixed.
That's a good point. It's the same launcher for now only because it's easier (and faster) to generate and upload one launcher rather than two, from the coursier CI (via this script).
Maybe we should use |
To answer @tpolecat's points:
Currently, this is kept in some metadata files written alongside launchers (the launchers are actually zip files, these metadata are under
Yes. The installed application launchers, and the installed JVMs, are quite independent from each other. They aren't even aware of each other. The app launchers will pick whatever version of java is installed on the current machine (via
For the But it's possible to run specific versions via $ cs launch scala:2.12.0
…
$ cs launch scala:2.12.0 -- …options…
…
No. The launchers are independent of each others. In more detail, they're tiny Java applications, with a list of URLs in a resource. Upon launch, they read that URL list, find the corresponding JARs in the coursier cache, and start that. So you can have |
@alexarchambault 👍 thanks for the explanations. As @lrytz suggests, I think it would be helpful to display this information prominently, and/or make it available via |
Agreed… I'll try to fix that. |
Thanks! Was this a Windows-only issue? What would be the cost of making sure this doesn't happen anymore? The link for the download automatically point to the latest release. Once we make it the default, we cannot afford the released installer to be broken like that. |
Yes, the code that crashed is only run on Windows (it's related to encoding some powershell code in base64 prior to running it…)
Right now, the native launchers are only generated upon release, as these take time to generate. I'm thinking about running some tests before pushing them, and / or maybe run those on a daily basis, so that we can catch regressions not too long after they occurred. |
About
this should be addressed in the upcoming release. It'll show the help message when run with no arguments, rather than not printing anything. On Windows, the installed |
Just a heads up, to tell that I think most issues around the
You need to install / update
(If the last step found no new update, do |
Following all the discussions and a suggestion of @julienrf, I have removed the changes to the download page, and only kept the blog post, so that we can move on by announcing the existence of the one-click install, encourage some people to test it more widely, but keep from recommending it by default until it's been tested more. I have kept the changes to the download page in a separate branch for safekeeping: https://github.com/sjrd/scala-lang/tree/one-click-install-by-default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Perhaps the blog post could open with some kind of indication of what lies ahead. And/or some kind of call-to-action for the community; what do we want people to do with this information? |
Actually, I think the first paragraph already does that. |
Change publication date to June 29
scala_lang tweet? |
Yes, good point. Fixed :) https://twitter.com/scala_lang/status/1278249350523748352 |
This is the future calling. Maybe the time is now. |
https://alexarchambault.github.io/posts/2020-09-21-cs-setup.html, very good information about the usage |
Update the download page with the brand new one-click install developed by @alexarchambault for the Scala Center, and add a blog post to give it visibility :)