scala/scala-async

Invalid and incomplete instructions in README.md for using -Xasync

jdjohnston opened this issue · 4 comments

Using the SBT example for -Xasync leads to SBT complaining that there is no scalaOptions. Makes sense, this is for the compiler. Changing it to scalacOptions then leads to scalac v2.13.3 giving the error "bad option: '-Xasync'". Perhaps this is only needed for Scala 2.12? Resolvable, but it certainly could be made easier for someone (like myself) new to scala-async.

That said, I look forward to seeing more from this interesting project

Scala 2.13.3 definitely accepts -Xasync, and yes it is required. I think you must be mistaken that you are actually using 2.13.3.

I fixed the scalaOptions vs scalacOptions thing in 7c494a7 — good catch, thanks.

Strange, when I commented out the -Xasync line in my build.sbt, it ran fine

sbt:async> scalaVersion
[info] 2.13.2

(Oops, 2.13.3 was the command-line scalac, not the one sbt is using)

oh, aha, you must be using the old 0.x plugin, which doesn't use -Xasync. try it with 1.0.0-M1

@retronym mind updating the README to have appropriate advice about what version(s) to use?

OK. I changed my build.sbt to require Scala 2.13.3 (was using 2.13.2) and scala-async 1.0.0-M1 . Also re-enabled -Xasync. Minimal project compiled & ran fine.

BTW, while the snippets of code in README.md are helpful, I found SmokeTest.scala in the test directory to be of the most help in getting started. I have some experience with concurrency & some with Scala, but little with the combination.