This doesn't answer the compile question you jad above but the example was so similar to some code I recently wrote I thought I'd share an alternative.
https://github.com/softprops/bintry/blob/master/src/main/scala/attrs.scala#L76
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
> To post to this group, send email to simple-b...@googlegroups.com.
> Visit this group at http://groups.google.com/group/simple-build-tool.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Thanks for reporting! It would be great to minimize it and I think I can help you.
The warning is coming from sbt when it's trying to index API of your Scala program while compiling. The relevant line is in ExtractAPI.scala file (it got refactored yesterday, before it was API.scala). I'm pretty sure the warning is coming from a point when you refer to NoCtxAttr and not where you declare that type. In order to nail down which source file is causing the problem you'll need to enable debugging output. Try setting scalacOptions to:
scalacOptions ++= Seq("-Ydebug", "-Ylog:xsbt-api")
and then compile and inspect the debug log by invoking `last compile`. In the debug log you should see lines telling you which file sbt is processing at the moment.
[info] [log xsbt-api(->typer ->parser)] [class] >> scala.annotation.unspecialized
[info] [log xsbt-api(->typer ->parser)] [class] << scala.annotation.unspecialized
[info] [log xsbt-api(->typer ->parser)] ClassfileLoader setting unspecialized.associatedFile = /home/ns/.sbt/boot/scala-2.10.2/lib/scala-library.jar(scala/annotation/unspecialized.class)
[info] [log xsbt-api(->parser)] [class] >> spray.json.JsBoolean
[info] [log xsbt-api(->parser)] [class] << spray.json.JsBoolean
[info] [log xsbt-api(->parser)] ClassfileLoader setting JsBoolean.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-json_2.10/jars/spray-json_2.10-1.2.5.jar(spray/json/JsBoolean.class)
[warn] Not a simple type:
[warn] Type: core.this.NoCtxAttr{type V >: lang.this.String with scala.this.Boolean with scala.this.Int{}} (class scala.reflect.internal.Types$RefinedType0)
[warn] Transformed: class xsbti.api.Structure
[info] [log xsbt-api(->parser)] [class] >> java.nio.charset.Charset
[info] [log xsbt-api(->parser)] ClassfileLoader setting Charset.associatedFile = /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/rt.jar(java/nio/charset/Charset.class)
[warn] Not a simple type:
[warn] Type: core.this.NoCtxAttr{type V >: scala.this.Boolean with lang.this.String with scala.this.Int with resources.this.VDev.VDevType.Val{}} (class scala.reflect.internal.Types$RefinedType0)
[warn] Transformed: class xsbti.api.Structure
[warn] Not a simple type:
[warn] Type: core.this.NoCtxAttr{type V >: scala.this.Long with lang.this.String with lang.this.String with scala.this.Boolean{}} (class scala.reflect.internal.Types$RefinedType0)
[warn] Transformed: class xsbti.api.Structure
[warn] Not a simple type:
[warn] Type: core.this.NoCtxAttr{type V >: lang.this.String with scala.this.Boolean{}} (class scala.reflect.internal.Types$RefinedType0)
[warn] Transformed: class xsbti.api.Structure
[warn] Not a simple type:
[warn] Type: core.this.NoCtxAttr{type V >: lang.this.String with scala.this.Boolean{}} (class scala.reflect.internal.Types$RefinedType0)
[warn] Transformed: class xsbti.api.Structure
[warn] Not a simple type:
[warn] Type: core.this.NoCtxAttr{type V >: scala.this.Int with ZPool.this.ZPoolStatus.Val with scala.this.Long{}} (class scala.reflect.internal.Types$RefinedType0)The associatedFiles are from spray-json and java.nio, not my code. You have to go up several hundred lines in the output to find any reference to my code, and none of these associatedFiles are in my code:
[warn] Transformed: class xsbti.api.Structure
[info] [running phase patmat on 42 compilation units]
[info] [running phase superaccessors on 42 compilation units]
[info] [running phase extmethods on 42 compilation units]
[info] [running phase pickler on 42 compilation units]
$ egrep 'Not a simple type|associated file' outfile
[info] [log xsbt-api(->parser)] ClassfileLoader setting MarshallingContext.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-httpx/jars/spray-httpx-1.2-20130712.jar(spray/httpx/marshalling/MarshallingContext.class)
[info] [log xsbt-api(->typer ->parser)] ClassfileLoader setting specialized.associatedFile = /home/ns/.sbt/boot/scala-2.10.2/lib/scala-library.jar(scala/specialized.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting SupervisorStrategy.associatedFile = /home/ns/.ivy2/cache/com.typesafe.akka/akka-actor_2.10/jars/akka-actor_2.10-2.2.0.jar(akka/actor/SupervisorStrategy.class)
[info] [log xsbt-api] ClassfileLoader setting AnyParamDefMagnet.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/directives/AnyParamDefMagnet.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting ChunkSizeMagnet.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/directives/ChunkSizeMagnet.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting HttpCookie.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-http/jars/spray-http-1.2-20130712.jar(spray/http/HttpCookie.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting Decoder.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-httpx/jars/spray-httpx-1.2-20130712.jar(spray/httpx/encoding/Decoder.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting HttpEncoding.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-http/jars/spray-http-1.2-20130712.jar(spray/http/HttpEncoding.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting Encoder.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-httpx/jars/spray-httpx-1.2-20130712.jar(spray/httpx/encoding/Encoder.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting DirectoryListing.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/directives/DirectoryListing.class)
[info] [log xsbt-api] ClassfileLoader setting FieldDefMagnet.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/directives/FieldDefMagnet.class)
[info] [log xsbt-api] ClassfileLoader setting OnSuccessFutureMagnet.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/directives/OnSuccessFutureMagnet.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting OnFailureFutureMagnet.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/directives/OnFailureFutureMagnet.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting HttpMethod.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-http/jars/spray-http-1.2-20130712.jar(spray/http/HttpMethod.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting HttpIp.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-http/jars/spray-http-1.2-20130712.jar(spray/http/HttpIp.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting UUID.associatedFile = /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/rt.jar(java/util/UUID.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting MediaTypes.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-http/jars/spray-http-1.2-20130712.jar(spray/http/MediaTypes.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting MediaType.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-http/jars/spray-http-1.2-20130712.jar(spray/http/MediaType.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting StandardRoute.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/StandardRoute.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting CompletionMagnet.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-20130712.jar(spray/routing/directives/CompletionMagnet.class)
[info] [log xsbt-api(->typer ->parser)] ClassfileLoader setting unspecialized.associatedFile = /home/ns/.sbt/boot/scala-2.10.2/lib/scala-library.jar(scala/annotation/unspecialized.class)
[info] [log xsbt-api(->parser)] ClassfileLoader setting JsBoolean.associatedFile = /home/ns/.ivy2/cache/io.spray/spray-json_2.10/jars/spray-json_2.10-1.2.5.jar(spray/json/JsBoolean.class)
[warn] Not a simple type:
[info] [log xsbt-api(->parser)] ClassfileLoader setting Charset.associatedFile = /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/rt.jar(java/nio/charset/Charset.class)
[warn] Not a simple type:
[warn] Not a simple type:
[warn] Not a simple type:
[warn] Not a simple type:
[warn] Not a simple type:None of that is mine. Should I be looking at something else?
It was pretty easy to send to crashyland. Here's the first one, I think there are more. This by itself doesn't incur the "not a simple type" in sbt (though it does crash it), but I got that message with a more complicated one.
class Attr { class Val }object Main {def f(x: Attr) = x match { case x: Attr => new x.Val }}
Ticket logged: https://issues.scala-lang.org/browse/SI-7701On 25 July 2013 13:02, Paul Phillips <pa...@improving.org> wrote:
It was pretty easy to send to crashyland. Here's the first one, I think there are more. This by itself doesn't incur the "not a simple type" in sbt (though it does crash it), but I got that message with a more complicated one.
class Attr { class Val }object Main {def f(x: Attr) = x match { case x: Attr => new x.Val }}I used your bigger sample because I also want to investigate the problem with the inferred type that sbt warns about.
Thank you guys!