Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SBT项目定义文件的弃用和功能警告_Sbt - Fatal编程技术网

SBT项目定义文件的弃用和功能警告

SBT项目定义文件的弃用和功能警告,sbt,Sbt,编译SBT项目定义(即项目目录中的文件)时,我收到了弃用和功能警告。SBT版本为0.13.0 通过设置scalacOptions:=Seq(“-feature”,“-deprecation”),我无法获得关于这些的更多信息,这似乎只适用于项目源文件,而不适用于项目定义文件 有人知道我如何在编译器编译项目定义时为它设置弃用和警告吗 [info] Loading project definition from /home/xxx/website/project [warn] there were 2

编译SBT项目定义(即
项目
目录中的文件)时,我收到了弃用和功能警告。SBT版本为0.13.0

通过设置
scalacOptions:=Seq(“-feature”,“-deprecation”)
,我无法获得关于这些的更多信息,这似乎只适用于项目源文件,而不适用于项目定义文件

有人知道我如何在编译器编译项目定义时为它设置弃用和警告吗

[info] Loading project definition from /home/xxx/website/project
[warn] there were 2 deprecation warning(s); re-run with -deprecation for details
[warn] there were 4 feature warning(s); re-run with -feature for details
[warn] two warnings found

创建具有以下内容的
project/build.sbt
项目定义文件:

scalacOptions := Seq("-feature", "-deprecation")
由于
project
下的任何
*.sbt
文件都属于元(构建)项目,因此它为构建配置而不是构建中项目的环境设置Scala编译器

使用sbt多项目样本进行了测试:

[info] Compiling 1 Scala source to /Users/jacek/sandbox/so/multi-0.13.1/project/target/scala-2.10/sbt-0.13/classes...
[warn] /Users/jacek/sandbox/so/multi-0.13.1/project/Build.scala:4: method error in object Predef is deprecated: Use `sys.error(message)` instead
[warn]   lazy val e = error("Launcher did not provide the Ivy home directory.")
[warn]                ^
[warn] one warning found
…当它编译以下
项目/Build.scala
时:

import sbt._

object Build extends Build {
  lazy val e = error("Launcher did not provide the Ivy home directory.")
}