Compilation error of tests when compiling from sbt 0.13.5 and -Yrangepos

13 views
Skip to first unread message

edmondo1984

unread,
May 28, 2016, 1:06:00 PM5/28/16
to specs2-users
Hello,

when I try to compile a scala project using SBT 0.13.5 and specs2 3.7 I get the following compiler error:

[info] ======= Position error
[info] Overlapping trees (1322,1317)
[info] == Ancestor tree [1410] of type ValDef at [1146:1228]OcrRestServerUploadSpec.scala
[info] 
[info] [L  41        ] #1410   [1146:1228]     ValDef     // connectionPool = Http().cachedHostConnectionPool[Int](localhostName,port=8096)
[info] 
[info] == First overlapping tree [1322] of type Select at [1173:1203]OcrRestServerUploadSpec.scala
[info] 
[info] [L  41        ] #1322   [1173:1203]     Select     // ().cachedHostConnectionPool[Int
[info] 
[info] == Second overlapping tree [1317] of type TypeTree at [1199:1202]OcrRestServerUploadSpec.scala
[info] 
[info] [L  41        ] #1317   [1199:1202]     TypeTree   // Int]
[info] 
[info] 
[info] While validating #4169
[info] [L   1        ] #4169   [0:3234]        PackageDef // ocr
[info] 
[info] Children:
[info]   [L   1 P# 4169] #25     [8:29]          Select     // ocr
[info]   [L   3 P# 4169] #28     [31:57]         Import     // java.io.InputStream
[info]   [L   4 P# 4169] #31     [58:85]         Import     // java.net.InetAddress
[info]   [L   6 P# 4169] #34     [87:116]        Import     // akka.actor.ActorSystem
[info]   [L   7 P# 4169] #38     [117:147]       Import     // akka.http.scaladsl.Http
[info]   [L   8 P# 4169] #41     [148:179]       Import     // org.specs2.Specification
[info]   [L   9 P# 4169] #47     [180:230]       Import     // akka.http.scaladsl.client.RequestBuilding._
[info]   [L  10 P# 4169] #52     [231:276]       Import     // akka.http.scaladsl.marshalling.Marshal
[info]   [L  11 P# 4169] #57     [277:310]       Import     // akka.http.scaladsl.model._
[info]   [L  12 P# 4169] #60     [311:347]       Import     // akka.stream.ActorMaterializer
[info]   [L  13 P# 4169] #64     [348:408]       Import     // akka.stream.scaladsl.{Sink, Source, StreamConverters}
[info]   [L  14 P# 4169] #67     [409:436]       Import     // akka.util.ByteString
[info]   [L  16 P# 4169] #71     [438:479]       Import     // scala.concurrent.duration.Duration
[info]   [L  17 P# 4169] #74     [480:519]       Import     // scala.concurrent.{Await, Future}
[info]   [L  18 P# 4169] #77     [520:555]       Import     // scala.util.{Success,Failure}
[info]   [L  23 P# 4169] #4168   [607:3234]      ClassDef   // OcrRestServerUploadSpec extends Specification {
[info] =======
[trace] Stack trace suppressed: run last ocrrest/test:compile for the full output.
[error] (ocrrest/test:compile) scala.reflect.internal.Positions$ValidateException: Overlapping trees (1322,1317)

Removing -Yrangepos from the scalacOptions solve the issues. Is this a known problem?

Thanks
Edmondo

etorreborre

unread,
May 29, 2016, 4:00:57 AM5/29/16
to specs2-users
Yes it is indeed a know issue that -Yrangepos breaks with some programs unfortunately.
Reply all
Reply to author
Forward
0 new messages