Open ScalaWilliam opened 3 years ago
Any update on this? The main Scala language website does not say how to run a Scala 3 application. Surely this is important.
@jacobus Agree. @ScalaWilliam Maybe the title of this issue should be broader, as this is not just UX consistency, it's about degradation of functionality from Scala 2. We need a runner on all 3 platforms.
why not just copy the approach kotlin uses:
$ kotlinc hello.kt -include-runtime -d hello.jar
$ java -jar hello.jar
Hello World!
so for scala3 it could be something like this:
$ alias scala3c=scala3-compiler
$ scala3c hello.scala -include-runtime -d hello.jar
$ java -jar hello.jar
Hello World!
or just make -include-runtime
the default and add a -exclude-runtime
flag instead
$ scala3c hello.scala -d hello.jar
$ java -jar hello.jar
Hello World!
and also a scala3-runner
$ alias scala3c=scala3-compiler
$ scala3c hello.scala
$ scala3 hello
Hello World!
python had a similar issue and was able to solve it by releasing python
and python3
cli executables
Once scala-cli
replaces scala
as the default Scala runner, perhaps we could close this.
Hi all!
Just noticed Scala 3 is now officially on the scala-lang.org website - that's absolutely fantastic! I would like to share some of my findings from a Windows user's point of view, that could be smoother.
Current UX & Explanation: it could do with more consistency (click to expand)
First, the download instructions on the homepage point to the Coursier & SBT websites. ![image](https://user-images.githubusercontent.com/2464813/119059298-ef56b680-b9c7-11eb-9ff0-7dcd65eb9370.png) You may then choose to do a quick set-up with Coursier, however for Windows users to enter commands like 'bitsadmin', is very unusual; people rarely ever do this on Windows. ![image](https://user-images.githubusercontent.com/2464813/119057408-5a9e8980-b9c4-11eb-9e0b-e94492e87783.png) (also the Windows instruction here is below the fold so you take a bit of time to find it; I include some examples of how Python and Nodejs do it below). There is another page, getting started, which instead has a link to the Coursier binary. Windows shows it may be unsafe - is there any way to fix this? ![image](https://user-images.githubusercontent.com/2464813/119057107-c6342700-b9c3-11eb-91d2-cbf6633034b8.png) This could be 'the' installer, and after installing you should get greeted with a message how to proceed. In fact, after running it myself, I was very pleased that everything I needed was installed, which is absolutely fantastic. Let's look at Python: When you go to the Python website, and try to download, it gives you a .exe, which you then open, ![image](https://user-images.githubusercontent.com/2464813/119058197-cf25f800-b9c5-11eb-80ab-fd60f0b0a88d.png) And then it gives you an installer (I already have it installed). ![image](https://user-images.githubusercontent.com/2464813/119058358-27f59080-b9c6-11eb-9e0a-81fc1e2631c8.png) Node.js: ![image](https://user-images.githubusercontent.com/2464813/119058558-8458b000-b9c6-11eb-836d-dc6cf00635b5.png) (this one I also have installed 😁 ) ![image](https://user-images.githubusercontent.com/2464813/119058581-90dd0880-b9c6-11eb-9ca8-bc2fdd9cd22a.png) There could be a segment of the market who might jump off at this point because this is their first point of touch with Scala, especially if coming for example from .NET which has all-inclusive GUI installers and similar. While many people in the Scala community use Mac we could definitely do better with smoother support for Windows, especially considering inclusivity; many potential members of the Scala community might come from countries where a Mac costs several months of salary, and normally use the OS that came with their PC, Windows; however they might drop off early despite all the amazing efforts done by the Scala community. Python's start-up UX is great and I believe is a huge contributor to its popularity.My suggestion (click to expand for some HTML) For Windows users, at the Download page, give only 1 choice, which is the "Scala Installer" (don't confuse them with SBT, and Coursier -- they probably heard of Scala only 5 minutes ago!). If anything, they could also be offered an offline installer with a small link below (which includes all the dependencies). Once the "Scala Installer" (Coursier) installs everything, it opens an HTML page with instructions how to use Scala. ![image](https://user-images.githubusercontent.com/2464813/119060539-48bfe500-b9ca-11eb-8974-167feb7a0d9f.png)
HTML (edited rapidly, so 🦅 ) ```htmlDo you need an offline installer? Download here (59MB).
The Scala Installer will install Scala as well as various utilities like SBT, Coursier, scalafmt, the Ammonite REPL, all of which you can use from PowerShell or cmd. Batteries included.