【问题标题】:error "can't expand macros compiled by previous versions of Scala". Using sbt and Scala Test,错误“无法扩展以前版本的 Scala 编译的宏”。使用 sbt 和 Scala 测试,
【发布时间】:2015-10-12 00:26:51
【问题描述】:

当我在 sbty 下运行 'test' 时出现上述错误。

环境:ScalaTest,sbt 版本 0.13.8

在 build.sbt 文件中尝试了 "scalaVersion := "2.10.4" 及以下依赖定义(两个选项):

//libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test"

libraryDependencies += "org.scalatest" % "scalatest_2.10" % "2.0" % "test"

在上述更改之后,我刷新了我的 sbt 项目。

错误仍然存​​在。谁能给点灯?

【问题讨论】:

    标签: scalatest


    【解决方案1】:

    在同事的帮助下,发现scalaTest(ArtifactID)的版本不正确,现在工作版本自动获取正确的Scala版本(即使用GroupID %% artifactID %revision INSTEAD OF GroupID % artificatID % 修订)。

    libraryDependencies += "org.scalatest"  %% "scalatest"   % "2.2.4" % Test //note 2.2.2 works too
    

    更多详情请见:http://www.scala-sbt.org/0.13/tutorial/Library-Dependencies.html

    【讨论】:

      猜你喜欢
      • 2015-11-18
      • 1970-01-01
      • 1970-01-01
      • 2017-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-12
      • 1970-01-01
      相关资源
      最近更新 更多