diff --git a/.travis.yml b/.travis.yml index 84a1e2f13..3c1dc5097 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: matrix: - SBT_CMD=";mimaReportBinaryIssues ;scalafmtCheckAll ;headerCheck ;test:headerCheck ;whitesourceOnPush ;test:compile; publishLocal ;mainSettingsProj/test ;safeUnitTests ;otherUnitTests; doc" - SBT_CMD="scripted actions/* apiinfo/* compiler-project/* ivy-deps-management/* reporter/* tests/* watch/* classloader-cache/* package/*" - - SBT_CMD="scripted dependency-management/* plugins/* project-load/* java/* run/*" + - SBT_CMD="scripted dependency-management/* plugins/* project-load/* java/* run/* nio/*" - SBT_CMD="repoOverrideTest:scripted dependency-management/*; scripted source-dependencies/* project/*" matrix: diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 29f1319c0..75813a56e 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -10,7 +10,7 @@ object Dependencies { def nightlyVersion: Option[String] = sys.props.get("sbt.build.version") // sbt modules - private val ioVersion = nightlyVersion.getOrElse("1.3.0-M12") + private val ioVersion = nightlyVersion.getOrElse("1.3.0-M13") private val utilVersion = nightlyVersion.getOrElse("1.3.0-M8") private val lmVersion = sys.props.get("sbt.build.lm.version") match { diff --git a/sbt/src/sbt-test/nio/file-hashes/build.sbt b/sbt/src/sbt-test/nio/file-hashes/build.sbt index 637d5ae6d..eba843fca 100644 --- a/sbt/src/sbt-test/nio/file-hashes/build.sbt +++ b/sbt/src/sbt-test/nio/file-hashes/build.sbt @@ -32,10 +32,10 @@ val checkAdded = taskKey[Unit]("check that modified files are returned") checkAdded := Def.taskDyn { val files = (foo / allInputFiles).value val added = (foo / changedInputFiles).value.map(_.created).getOrElse(Nil) - if (added.isEmpty || files.sameElements(added)) Def.task(assert(true)) + if (added.isEmpty || (files.toSet == added.toSet)) Def.task(assert(true)) else Def.task { val base = baseDirectory.value / "base" - assert(files.sameElements(Seq("Bar.md", "Foo.txt").map(p => (base / p).toPath))) + assert(files.toSet == Set("Bar.md", "Foo.txt").map(p => (base / p).toPath)) assert(added == Seq((baseDirectory.value / "base" / "Bar.md").toPath)) } }.value diff --git a/sbt/src/sbt-test/nio/legacy-filters/build.sbt b/sbt/src/sbt-test/nio/legacy-filters/build.sbt new file mode 100644 index 000000000..2be01658b --- /dev/null +++ b/sbt/src/sbt-test/nio/legacy-filters/build.sbt @@ -0,0 +1,8 @@ +Compile / excludeFilter := "Bar.scala" || "Baz.scala" + +val checkSources = inputKey[Unit]("Check that the compile sources match the input file names") +checkSources := { + val sources = Def.spaceDelimited("").parsed.toSet + val actual = (Compile / unmanagedSources).value.map(_.getName).toSet + assert(sources == actual) +} diff --git a/sbt/src/sbt-test/nio/legacy-filters/src/main/scala/Bar.scala b/sbt/src/sbt-test/nio/legacy-filters/src/main/scala/Bar.scala new file mode 100644 index 000000000..afa08f013 --- /dev/null +++ b/sbt/src/sbt-test/nio/legacy-filters/src/main/scala/Bar.scala @@ -0,0 +1 @@ +class Bar { \ No newline at end of file diff --git a/sbt/src/sbt-test/nio/legacy-filters/src/main/scala/Foo.scala b/sbt/src/sbt-test/nio/legacy-filters/src/main/scala/Foo.scala new file mode 100644 index 000000000..43c42f145 --- /dev/null +++ b/sbt/src/sbt-test/nio/legacy-filters/src/main/scala/Foo.scala @@ -0,0 +1 @@ +class Foo \ No newline at end of file diff --git a/sbt/src/sbt-test/nio/legacy-filters/test b/sbt/src/sbt-test/nio/legacy-filters/test new file mode 100644 index 000000000..ae779a65c --- /dev/null +++ b/sbt/src/sbt-test/nio/legacy-filters/test @@ -0,0 +1,9 @@ +> checkSources Foo.scala + +> compile + +> set Compile / excludeFilter := HiddenFileFilter + +> checkSources Foo.scala Bar.scala + +-> compile \ No newline at end of file diff --git a/sbt/src/sbt-test/nio/make-clone/build.sbt b/sbt/src/sbt-test/nio/make-clone/build.sbt index f10df2f02..8bee73e73 100644 --- a/sbt/src/sbt-test/nio/make-clone/build.sbt +++ b/sbt/src/sbt-test/nio/make-clone/build.sbt @@ -1,6 +1,8 @@ import java.nio.file.{ Files, Path } import scala.sys.process._ +val compileOpts = settingKey[Seq[String]]("Extra compile options") +compileOpts := { if (scala.util.Properties.isLinux) "-fPIC" :: "-std=gnu99" :: Nil else Nil } val compileLib = taskKey[Seq[Path]]("Compile the library") compileLib / sourceDirectory := sourceDirectory.value / "lib" compileLib / fileInputs := { @@ -34,7 +36,8 @@ compileLib := { cFiles.map { file => val outFile = objectDir.resolve(objectFileName(file)) logger.info(s"Compiling $file to $outFile") - Seq("gcc", "-c", file.toString, s"-I$include", "-o", outFile.toString).!! + (Seq("gcc") ++ compileOpts.value ++ + Seq("-c", file.toString, s"-I$include", "-o", outFile.toString)).!! outFile } } @@ -87,15 +90,14 @@ compileMain := { case Seq(main) => Files.createDirectories(outDir) logger.info(s"Building executable $outPath") - Seq( - "gcc", + (Seq("gcc") ++ compileOpts.value ++ Seq( main.toString, s"-I$include", "-o", outPath.toString, s"-L${library.getParent}", "-lfoo" - ).!! + )).!! outPath case main => throw new IllegalStateException(s"multiple main files detected: ${main.mkString(",")}")