Hello,I'm trying to compile a project where I use Scala 2.10 reflection api for runtime reflection.Everything is fine if I compile with my usual IDE (IntelliJ), but when I clean and run tests with sbt only, I get test failures that vary from execution to execution, like:
- java.lang.AssertionError: assertion failed: no symbol could be loaded from interface java.util.Collection in package util with name Collection and classloader null
- scala.reflect.internal.Types$TypeError: illegal cyclic inheritance involving trait Map
- scala.reflect.internal.Types$TypeError: illegal cyclic inheritance involving trait Product
- java.lang.AssertionError: assertion failed: not a type: symbol
I tried building the project with sbt-0.13 nightly build (last available today) and it works perfectly.Is there any work around to build such a project with sbt 0.12? Or maybe it is supposed to work and I may be doing something wrong?Just in case it may help, here I add a fragment of Scala code where the aforementioned exceptions are being thrown:def schemaOf[T](scalaType: Type) = scalaType match {case t if t =:= typeOf[Byte] => "integer"case t if t =:= typeOf[Short] => "integer"
// More cases omitted for brevitycase t if t <:< weakTypeOf[Option[_]] => "option " + schemaOf(t.asInstanceOf[TypeRefApi].args.headcase t if t <:< typeOf[Map[String, Any]] => "map"case t if t <:< weakTypeOf[TraversableOnce[_]] => {"collection " + schemaOf(t.asInstanceOf[TypeRefApi].args.head}case _ => {val fields = scalaType.members.filter(s => s.isTerm && !s.isMethod)val name = scalaType.typeSymbol.name.toString"object " + name + " with fields " + fields}}Thanks in advance,Jordi