I am editing an Eclipse Scala IDE and my tests are run on a separate screen using ~ test in sbt . My tests are written using specs2 .
This gives me double compilations, and sometimes Eclipse still builds until sbt starts kicking.
To solve this problem, I turned off auto build, but also removes wonderful warnings and compiler errors in Eclipse.
Is there a way to have both without double compile time?
Edit
I think the best way (or maybe the only way) is to have sbt run tests without compiling them. I tried the test:run command, but this gives me the following error:
java.lang.RuntimeException: No main class detected. at scala.sys.package$.error(package.scala:27) at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27$$anonfun$13.apply(Defaults.scala:519) at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27$$anonfun$13.apply(Defaults.scala:519) at scala.Option.getOrElse(Option.scala:108) at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27.apply(Defaults.scala:519) at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27.apply(Defaults.scala:518) at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:581) at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:581) at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49) at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311) at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311) at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41) at sbt.std.Transform$$anon$5.work(System.scala:71) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
How can I use ~ test:run while Eclipse compiles the files?
source share