Scourt is a Scala-3 compiler plugin that implements a form of coroutines for Scala.
The following projects have been unaggregated and must be compiled seperately and run with runMain:
- continuationsPluginExample
- zero-arguments-no-continuation-treeview
- zero-arguments-one-continuation-code-before-used-after
- list-map
- two-arguments-two-continuations
To run these projects, you must use runMain
with the fully qualified name of the main.
$ sbt
root> continuationsPluginExample/runMain examples.ThreeDependentcontinuations
This is so that ci build will continue to work until sbt/zinc#1174 is merged and resolved.
Pre-requisites:
- Java 19
- Scala 3
-
Download the latest Project Loom Early-Access build for your system architecture.
This is easy to do if you are using SDKMAN. First list java versions with
sdk list java
, andsdk install java 19-ea-<XX>-open
, where XX is the latest Java.net version 19 release number. Make it the default withsdk default java 19-ea-<XX>-open
. -
Set your
JAVA_HOME
to the path you extracted above.
Unnecessary if you have set the ea build to be your default in sdkman.
You can now compile and run the tests:
env JAVA_OPTS='--enable-preview --add-modules jdk.incubator.concurrent' sbt "clean; compile; test"
NOTE: The Loom project is defined as an incubator module that is a means to distribute APIs which are not final or completed to get feedback from the developers.
You should include the -add-module
Java option to add the module to the class path of the project.