为什么scalatest不能编译?

为什么scalatest不能编译?,scala,scalatest,Scala,Scalatest,我有一个简单的测试设置,如 package unit import net.kolotyluk.leaderboard.scorekeeping._ import net.kolotyluk.leaderboard.telemetry.Metrics import net.kolotyluk.scala.extras.Logging import org.scalatest.{FlatSpec, GivenWhenThen, Matchers, SequentialNestedSuiteExe

我有一个简单的测试设置,如

package unit

import net.kolotyluk.leaderboard.scorekeeping._
import net.kolotyluk.leaderboard.telemetry.Metrics
import net.kolotyluk.scala.extras.Logging
import org.scalatest.{FlatSpec, GivenWhenThen, Matchers, SequentialNestedSuiteExecution}

import scala.collection.mutable.ArrayBuffer
import scala.concurrent.{Await,Future}
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.util.{Failure, Random, Success}

class LeaderboardSpec
  extends FlatSpec
    with SequentialNestedSuiteExecution
    with GivenWhenThen
    with Matchers
    with Logging {

  behavior of "Leaderboard"

  it must "handle initial conditions correctly" in {
但是当我试图编译我的测试时,我得到了53个错误,比如

[IJ]sbt:leaderboard> test
[info] Compiling 1 Scala source to C:\Users\ERIC\Documents\git\repos\leaderboard\target\scala-2.12\test-classes ...
[error] C:\Users\ERIC\Documents\git\repos\leaderboard\src\test\scala\unit\LeaderboardSpec.scala:21:12: could not find implicit value for parameter pos: org.scalactic.source.Position
[error]   behavior of "Leaderboard"
[error]            ^
这实际上并没有传达任何关于问题所在的有用信息。我只能假设在build.sbt文件或其他地方没有正确配置某些内容

这段代码曾经运行过,在我清理过程中的某个地方,情况发生了变化,现在它在没有良好诊断的情况下被破坏了


有人能提出一些建议吗?

因此,一种似乎可以正确编译和运行的解决方法是停止使用SBT,而改用Maven


我认为这是迄今为止我在SBT中发现的第三个主要缺陷。

这与类似的问题类似是的,但问题发生在IntelliJ之外,从命令行上的SBT开始。现在回顾一下这些东西…也看不到任何对我有用的东西。