Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a simple way to compile an sbt project with Dotty?

Tags:

scala

sbt

dotty

Now that Dotty is apparently getting ready to compile larger projects, I wonder if there is a simple way to use it as drop-in replacement for Scalac in sbt projects? Like if I had the following build.sbt:

name := "Foo"

scalaVersion := "2.11.7"

Are there some steps I can take to swap out Scalac for Dotc here?

like image 493
0__ Avatar asked Oct 29 '15 10:10

0__


People also ask

How do I compile sbt?

sbt shell has a command prompt (with tab completion and history!). To compile again, press up arrow and then enter. To run your program, type run . To leave sbt shell, type exit or use Ctrl+D (Unix) or Ctrl+Z (Windows).

What does sbt Dist do?

The dist task builds a binary version of your application that you can deploy to a server without any dependency on sbt, the only thing the server needs is a Java installation. This produces a ZIP file containing all JAR files needed to run your application in the target/universal folder of your application.

What does the src folder contain in an sbt project?

The project folder contains sbt configurations and settings, while src contains all your source code. sbt creates the target folder after you compile your code; it includes the JVM bytecode of your application.


1 Answers

We've merged #2344 Make sbt aware of Dotty feature contributed by Guillaume Martres, and it will be part of 0.13.10. In the meantime you can try it with the nightly published to https://repo.scala-sbt.org/scalasbt/ivy-snapshots/.

like image 198
Eugene Yokota Avatar answered Sep 26 '22 20:09

Eugene Yokota