-
Notifications
You must be signed in to change notification settings - Fork 90
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
scala.reflect.internal.annotations.uncheckedBounds in compiler mirror not found #220
Comments
Minimal example: build.sbt scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked"
)
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.10.0" AsyncApp.scala import scala.async.Async._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object AsyncApp {
def main(args: Array[String]): Unit = {
work()
}
def work(): Future[String] = async {
val result: String = await { send() }
result.toUpperCase
}
def send(): Future[String] = {
Future.successful("ok")
}
} |
thanks for the minimization. can you confirm that the problem goes away if you add I think the problem will also go away if you use Scala 2.12.8. sbt 1.2.8's default Scala version is 2.12.7. |
Hi Seth! Changing Scala version doesn't help. I have tried |
@retronym does this mean that we screwed up the 0.10.0 publishing? |
@SethTisue Looks like f8a5b00 removed the try/catch around the the lookup of What's the solution? We could introduce a dependency on scala-reflect in our POM. The downside is that it will end up on user's runtime classpath unless they override things in their build. Just adding the try/catch back in isn't a great solution, as it might expose users to bounds errors when refchecks inspects the types of the temporary vals extracted by the ANF transform (these ill-bounded inferred types are not flagged as errors in the types of within chained expressions.) |
can't we declare the dependency as "provided" to prevent that? /cc @eed3si9n |
My understanding is that a provided scope dependency is not transitively depended on (even in the "provided" scope) for projects that depend on us. https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope |
Right. "provided" assumes that the app will provide the runtime, so it will not transitively add things to Compile configuration. |
I guess this is a documentation issue, then. PR with README change welcome |
As of scala-async 1.0, scala-reflect will not be needed on the compilation classpath at all. I've simplified the README accordingly in #237. |
We tried to upgrade our project to 0.10.0, but all compilation now fails with
Scala version is 2.12.8 and sbt 1.2.8.
The text was updated successfully, but these errors were encountered: