-
Notifications
You must be signed in to change notification settings - Fork 0
Migrating Flix Compiler to Scala 3
Jakob Schneider edited this page Apr 6, 2023
·
5 revisions
- https://docs.scala-lang.org/scala3/guides/migration/tooling-migration-mode.html
- https://docs.scala-lang.org/scala3/guides/migration/incompatibility-table.html
Running
scalac -Xsource:3 -sourcepath main/src/ -classpath lib/ main/src/ca/uwaterloo/flix/Main.scala
yields errors as it does not know where to find the online dependencies (from Maven central).
Maybe this can be fixed by adding the -Xsource:3 flag to the compiler in build.gradle or downloading the dependencies / jars manually
from Maven and including it in the lib/ directory.
When this works, the code has to be written to have zero incompatibilities, after which we should invoke the Scala 3 compiler (possibly also with some more library flags etc.):
scalac -rewrite -source:3.0-migration main/src/ca/uwaterloo/flix/Main.scala
Maybe this last part can also be invoked from Gradle.