Skip to content

Commit cf6c1d7

Browse files
committed
Fix warnings in sbt build
1 parent 6eeb06f commit cf6c1d7

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

project/Build.scala

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -276,22 +276,20 @@ object DottyBuild extends Build {
276276
// Override run to be able to run compiled classfiles
277277
dotr := {
278278
val args: Seq[String] = spaceDelimited("<arg>").parsed
279-
val java: String = Process("which" :: "java" :: Nil) !!
280-
val scalaLib = (dependencyClasspath in Runtime, packageAll)
281-
.map { (attList, _) =>
282-
attList
283-
.map(_.data.getAbsolutePath)
284-
.find(_.contains("scala-library"))
285-
.toList.mkString(":")
286-
}.value
279+
val java: String = Process("which" :: "java" :: Nil).!!
280+
val attList = (dependencyClasspath in Runtime).value
281+
val scalaLib = attList
282+
.map(_.data.getAbsolutePath)
283+
.find(_.contains("scala-library"))
284+
.toList.mkString(":")
287285

288286
if (java == "")
289287
println("Couldn't find java executable on path, please install java to a default location")
290288
else if (scalaLib == "") {
291289
println("Couldn't find scala-library on classpath, please run using script in bin dir instead")
292290
} else {
293291
val dottyLib = packageAll.value("dotty-library")
294-
s"""$java -classpath .:$dottyLib:$scalaLib ${args.mkString(" ")}""" !
292+
s"""$java -classpath .:$dottyLib:$scalaLib ${args.mkString(" ")}""".!
295293
}
296294
},
297295
run := Def.inputTaskDyn {
@@ -327,7 +325,7 @@ object DottyBuild extends Build {
327325
partestLockFile.createNewFile
328326
partestLockFile.deleteOnExit
329327
},
330-
runPartestRunner <<= Def.inputTaskDyn {
328+
runPartestRunner := Def.inputTaskDyn {
331329
// Magic! This is both an input task and a dynamic task. Apparently
332330
// command line arguments get passed to the last task in an aliased
333331
// sequence (see partest alias below), so this works.
@@ -341,7 +339,7 @@ object DottyBuild extends Build {
341339
s"""-dottyJars ${jars.length + 2} dotty.jar dotty-lib.jar ${jars.mkString(" ")}"""
342340
// Provide the jars required on the classpath of run tests
343341
runTask(Test, "dotty.partest.DPConsoleRunner", dottyJars + " " + args.mkString(" "))
344-
},
342+
}.evaluated,
345343

346344
/* Add the sources of scalajs-ir.
347345
* To guarantee that dotty can bootstrap without depending on a version
@@ -386,7 +384,10 @@ object DottyBuild extends Build {
386384

387385
// http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala
388386
// packageAll should always be run before tests
389-
javaOptions <++= (dependencyClasspath in Runtime, packageAll) map { (attList, pA) =>
387+
javaOptions ++= {
388+
val attList = (dependencyClasspath in Runtime).value
389+
val pA = packageAll.value
390+
390391
// put needed dependencies on classpath:
391392
val path = for {
392393
file <- attList.map(_.data)
@@ -632,7 +633,7 @@ object DottyInjectedPlugin extends AutoPlugin {
632633
/* Make sure jsDependencyManifest runs after compile, otherwise compile
633634
* might remove the entire directory afterwards.
634635
*/
635-
jsDependencyManifest <<= jsDependencyManifest.dependsOn(compile)
636+
jsDependencyManifest := jsDependencyManifest.dependsOn(compile).value
636637
)))
637638

638639
lazy val `dotty-bench` = project.in(file("bench")).
@@ -652,7 +653,10 @@ object DottyInjectedPlugin extends AutoPlugin {
652653
parallelExecution in Test := false,
653654

654655
// http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala
655-
javaOptions <++= (dependencyClasspath in Runtime, packageBin in Compile) map { (attList, bin) =>
656+
javaOptions ++= {
657+
val attList = (dependencyClasspath in Runtime).value
658+
val bin = (packageBin in Compile).value
659+
656660
// put the Scala {library, reflect, compiler} in the classpath
657661
val path = for {
658662
file <- attList.map(_.data)

0 commit comments

Comments
 (0)