Skip to content
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

Windows & Scala 3 UX - consistency #1248

Open
ScalaWilliam opened this issue May 25, 2021 · 6 comments
Open

Windows & Scala 3 UX - consistency #1248

ScalaWilliam opened this issue May 25, 2021 · 6 comments

Comments

@ScalaWilliam
Copy link
Contributor

ScalaWilliam commented May 25, 2021

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

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
(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

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

And then it gives you an installer (I already have it installed).
image

Node.js:
image

(this one I also have installed 😁 )
image

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

HTML (edited rapidly, so 🦅 )
<div class="install-steps">


<div class="download-options">
  <div class="download-left">
    
    <a href="https://git.io/coursier-cli-windows-exe" class="btn-download">
      <i class="fa fa-download"></i>
      <span>Download the Scala installer (.exe, 64-bit)</span>
    </a>
    <div class="text-variant" style="text-align:center">
      <p style="font-style:italic">Do you need an offline installer? <a>Download here (59MB)</a>.</p>
<p>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. <u>Batteries included</u>.</p>
      
    </div>
  </div>
  
</div>
</div>
@bjornregnell
Copy link
Contributor

See also coursier/coursier#2058 and scala/scala3#12502

@jacobus
Copy link

jacobus commented Jun 18, 2021

Any update on this? The main Scala language website does not say how to run a Scala 3 application. Surely this is important.

@bjornregnell
Copy link
Contributor

bjornregnell commented Jun 19, 2021

@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.

@bjornregnell
Copy link
Contributor

See also #1250

@mrt181
Copy link

mrt181 commented Jul 15, 2021

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

@SethTisue
Copy link
Member

Once scala-cli replaces scala as the default Scala runner, perhaps we could close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants