Skip to content

Commit d5fad45

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

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

project/Build.scala

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -276,22 +276,21 @@ 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 _ = packageAll.value
282+
val scalaLib = attList
283+
.map(_.data.getAbsolutePath)
284+
.find(_.contains("scala-library"))
285+
.toList.mkString(":")
287286

288287
if (java == "")
289288
println("Couldn't find java executable on path, please install java to a default location")
290289
else if (scalaLib == "") {
291290
println("Couldn't find scala-library on classpath, please run using script in bin dir instead")
292291
} else {
293292
val dottyLib = packageAll.value("dotty-library")
294-
s"""$java -classpath .:$dottyLib:$scalaLib ${args.mkString(" ")}""" !
293+
s"""$java -classpath .:$dottyLib:$scalaLib ${args.mkString(" ")}""".!
295294
}
296295
},
297296
run := Def.inputTaskDyn {
@@ -327,7 +326,7 @@ object DottyBuild extends Build {
327326
partestLockFile.createNewFile
328327
partestLockFile.deleteOnExit
329328
},
330-
runPartestRunner <<= Def.inputTaskDyn {
329+
runPartestRunner := Def.inputTaskDyn {
331330
// Magic! This is both an input task and a dynamic task. Apparently
332331
// command line arguments get passed to the last task in an aliased
333332
// sequence (see partest alias below), so this works.
@@ -341,7 +340,7 @@ object DottyBuild extends Build {
341340
s"""-dottyJars ${jars.length + 2} dotty.jar dotty-lib.jar ${jars.mkString(" ")}"""
342341
// Provide the jars required on the classpath of run tests
343342
runTask(Test, "dotty.partest.DPConsoleRunner", dottyJars + " " + args.mkString(" "))
344-
},
343+
}.evaluated,
345344

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

387386
// http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala
388387
// packageAll should always be run before tests
389-
javaOptions <++= (dependencyClasspath in Runtime, packageAll) map { (attList, pA) =>
388+
javaOptions ++= {
389+
val attList = (dependencyClasspath in Runtime).value
390+
val pA = packageAll.value
391+
390392
// put needed dependencies on classpath:
391393
val path = for {
392394
file <- attList.map(_.data)
@@ -632,7 +634,7 @@ object DottyInjectedPlugin extends AutoPlugin {
632634
/* Make sure jsDependencyManifest runs after compile, otherwise compile
633635
* might remove the entire directory afterwards.
634636
*/
635-
jsDependencyManifest <<= jsDependencyManifest.dependsOn(compile)
637+
jsDependencyManifest := jsDependencyManifest.dependsOn(compile).value
636638
)))
637639

638640
lazy val `dotty-bench` = project.in(file("bench")).
@@ -652,7 +654,10 @@ object DottyInjectedPlugin extends AutoPlugin {
652654
parallelExecution in Test := false,
653655

654656
// 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) =>
657+
javaOptions ++= {
658+
val attList = (dependencyClasspath in Runtime).value
659+
val bin = (packageBin in Compile).value
660+
656661
// put the Scala {library, reflect, compiler} in the classpath
657662
val path = for {
658663
file <- attList.map(_.data)

0 commit comments

Comments
 (0)