-
Notifications
You must be signed in to change notification settings - Fork 55
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
sbt-scoverage plugin causes compilation error #60
Comments
Reproduced locally. Trying to work it out... |
Interim results:
I don't suppose as a temporary workaround you can switch to 2.11? :-) |
Sample output:
|
yah, Scala 2.11 would be more of a work-detour than a work-around :-) |
This is evidently not an scoverage-specific thing, but rather that scoverage configures scalac with |
This is, unfortunately, a known bug in Scala 2.10 (see SI-8510). Seeing as 2.10 is pretty much end-of-lifed, I don't expect it to ever be fixed, and is a non-issue for 2.11 up. Unfortunately I haven't been able to dig up a workaround, and since this not an Accord-specific issue (you're liable to run into this problem with any macro library, including most JSON libraries, shapeless, specs2 etc.) I don't think I can justify the time digging further into this. I'd be happy to help if anyone else is interested, though :-) |
to reproduce, add to project/plugins.sbt
and to build.sbt:
next create the following Scala class:
finally running from sbt:
sbt coverage compile
you should see the following error:
[error] while compiling: /home/noamb/reproduce-accord-bug/src/main/scala-2.10/ReproduceBug.scala
[error] during phase: typer
[error] library version: version 2.10.5
[error] compiler version: version 2.10.5
...
[error] last tree to typer: Ident(Classroom)
[error] symbol: object Classroom (flags: )
[error] symbol definition: object Classroom
[error] tpe: Classroom.type
[error] symbol owners: object Classroom -> package
[error] context owners: method readResolve -> object Classroom -> package
[error]
[error] == Enclosing template or block ==
[error]
[error] DefDef( // private def readResolve(): Object in object Classroom
[error] private
[error] "readResolve"
[error] []
[error] List(Nil)
[error] // tree.tpe=Object
[error] "Classroom" // object Classroom, tree.tpe=Classroom.type
[error] )
[error]
[error] == Expanded type of tree ==
[error]
[error] TypeRef(
[error] TypeSymbol(
[error] class Classroom extends AbstractFunction2[Person,Seq[Person],Classroom] with Serializable
[error]
[error] )
[error] )
[error]
[error] uncaught exception during compilation: scala.tools.nsc.interactive.RangePositions$ValidateException
scala.tools.nsc.interactive.RangePositions$ValidateException: Synthetic tree [2958] contains nonsynthetic tree [2792]
The text was updated successfully, but these errors were encountered: