diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbc83f1d74..88c47b39e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,7 +161,8 @@ jobs: # test building sbtn on Linux sbt "-Dsbt.io.virtual=false" nativeImage # smoke test native Image - ./client/target/bin/sbtn shutdown + ./client/target/bin/sbtn --sbt-script=$(pwd)/sbt about + ./client/target/bin/sbtn --sbt-script=$(pwd)/sbt shutdown # test launcher script echo build using JDK 8 test using JDK 8 and JDK 11 cd launcher-package @@ -189,6 +190,9 @@ jobs: run: | # test building sbtn on Windows sbt "-Dsbt.io.virtual=false" nativeImage + # smoke test native Image + ./client/target/bin/sbtn --sbt-script=$(pwd)/launcher-package/src/universal/bin/sbt.bat about + ./client/target/bin/sbtn --sbt-script=$(pwd)/launcher-package/src/universal/bin/sbt.bat shutdown # test launcher script echo build using JDK 8, test using JDK 8, on Windows cd launcher-package diff --git a/build.sbt b/build.sbt index 7bc842facb..84d5c182cf 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,7 @@ import scala.util.Try // ThisBuild settings take lower precedence, // but can be shared across the multi projects. ThisBuild / version := { - val v = "1.10.10-SNAPSHOT" + val v = "1.10.11-SNAPSHOT" nightlyVersion.getOrElse(v) } ThisBuild / version2_13 := "2.0.0-SNAPSHOT" diff --git a/launcher-package/integration-test/src/test/scala/RunnerTest.scala b/launcher-package/integration-test/src/test/scala/RunnerTest.scala index 382b259d77..4ea58563b0 100755 --- a/launcher-package/integration-test/src/test/scala/RunnerTest.scala +++ b/launcher-package/integration-test/src/test/scala/RunnerTest.scala @@ -33,19 +33,32 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions { () } + def testVersion(lines: List[String]): Unit = { + assert(lines.size >= 2) + val expected0 = s"(?m)^sbt version in this project: $versionRegEx(\\r)?" + assert(lines(0).matches(expected0)) + val expected1 = s"sbt runner version: $versionRegEx$$" + assert(lines(1).matches(expected1)) + } + test("sbt -V|-version|--version should print sbtVersion") { val out = sbtProcess("-version").!!.trim - val expectedVersion = - s"""|(?m)^sbt version in this project: $versionRegEx(\\r)? - |sbt script version: $versionRegEx$$ - |""".stripMargin.trim.replace("\n", "\\n") - assert(out.matches(expectedVersion)) + testVersion(out.linesIterator.toList) val out2 = sbtProcess("--version").!!.trim - assert(out2.matches(expectedVersion)) + testVersion(out2.linesIterator.toList) val out3 = sbtProcess("-V").!!.trim - assert(out3.matches(expectedVersion)) + testVersion(out3.linesIterator.toList) + } + + test("sbt -V in empty directory") { + IO.withTemporaryDirectory { tmp => + val out = sbtProcessInDir(tmp)("-V").!!.trim + val expectedVersion = "^"+versionRegEx+"$" + val targetDir = new File(tmp, "target") + assert(!targetDir.exists, "expected target directory to not exist, but existed") + } () } diff --git a/launcher-package/src/universal/bin/sbt.bat b/launcher-package/src/universal/bin/sbt.bat index 3de1fbd88b..fc4986e0b2 100755 --- a/launcher-package/src/universal/bin/sbt.bat +++ b/launcher-package/src/universal/bin/sbt.bat @@ -51,6 +51,7 @@ set sbt_args_sbt_version= set sbt_args_mem= set sbt_args_client= set sbt_args_no_server= +set is_this_dir_sbt=0 rem users can set SBT_OPTS via .sbtopts if exist .sbtopts for /F %%A in (.sbtopts) do ( @@ -532,14 +533,21 @@ set SBT_ARGS=!SBT_ARGS! %0 goto args_loop :args_end +if exist build.sbt ( + set is_this_dir_sbt=1 +) +if exist project\build.properties ( + set is_this_dir_sbt=1 +) + rem Confirm a user's intent if the current directory does not look like an sbt rem top-level directory and the "new" command was not given. -if not defined sbt_args_allow_empty if not defined sbt_args_print_version if not defined sbt_args_print_sbt_version if not defined sbt_args_print_sbt_script_version if not defined shutdownall if not exist build.sbt ( - if not exist project\ ( +if not defined sbt_args_allow_empty if not defined sbt_args_print_version if not defined sbt_args_print_sbt_version if not defined sbt_args_print_sbt_script_version if not defined shutdownall ( + if not !is_this_dir_sbt! equ 1 ( if not defined sbt_new ( - echo [error] Neither build.sbt nor a 'project' directory in the current directory: "%CD%" - echo [error] run 'sbt new', touch build.sbt, or run 'sbt --allow-empty'. + >&2 echo [error] Neither build.sbt nor a 'project' directory in the current directory: "%CD%" + >&2 echo [error] run 'sbt new', touch build.sbt, or run 'sbt --allow-empty'. goto error ) ) @@ -555,7 +563,7 @@ if !shutdownall! equ 1 ( taskkill /F /PID %%i set /a count=!count!+1 ) - echo shutdown !count! sbt processes + >&2 echo shutdown !count! sbt processes goto :eof ) @@ -667,9 +675,14 @@ if !sbt_args_print_sbt_version! equ 1 ( ) if !sbt_args_print_version! equ 1 ( - call :set_sbt_version - echo sbt version in this project: !sbt_version! - echo sbt script version: !init_sbt_version! + if !is_this_dir_sbt! equ 1 ( + call :set_sbt_version + echo sbt version in this project: !sbt_version! + ) + echo sbt runner version: !init_sbt_version! + >&2 echo. + >&2 echo [info] sbt runner ^(sbt-the-batch-script^) is a runner to run any declared version of sbt. + >&2 echo [info] Actual version of the sbt is declared using project\build.properties for each build. goto :eof ) @@ -910,14 +923,14 @@ set /a required_version=8 if /I !JAVA_VERSION! GEQ !required_version! ( exit /B 0 ) -echo. -echo The Java Development Kit ^(JDK^) installation you have is not up to date. -echo sbt requires at least version !required_version!+, you have -echo version "!JAVA_VERSION!" -echo. -echo Please go to http://www.oracle.com/technetwork/java/javase/downloads/ and download -echo a valid JDK and install before running sbt. -echo. +>&2 echo. +>&2 echo The Java Development Kit ^(JDK^) installation you have is not up to date. +>&2 echo sbt requires at least version !required_version!+, you have +>&2 echo version "!JAVA_VERSION!" +>&2 echo. +>&2 echo Go to https://adoptium.net/ etc and download +>&2 echo a valid JDK and install before running sbt. +>&2 echo. exit /B 1 :copyrt diff --git a/main-command/src/main/scala/sbt/internal/client/NetworkClient.scala b/main-command/src/main/scala/sbt/internal/client/NetworkClient.scala index 3eea88c11a..6bc13337fb 100644 --- a/main-command/src/main/scala/sbt/internal/client/NetworkClient.scala +++ b/main-command/src/main/scala/sbt/internal/client/NetworkClient.scala @@ -153,6 +153,7 @@ class NetworkClient( private lazy val noTab = arguments.completionArguments.contains("--no-tab") private lazy val noStdErr = arguments.completionArguments.contains("--no-stderr") && !sys.env.contains("SBTN_AUTO_COMPLETE") && !sys.env.contains("SBTC_AUTO_COMPLETE") + private def shutdownOnly = arguments.commandArguments == Seq(Shutdown) private def mkSocket(file: File): (Socket, Option[String]) = ClientSocket.socket(file, useJNI) @@ -188,7 +189,10 @@ class NetworkClient( ): (Socket, Option[String]) = try { if (!portfile.exists) { - if (promptCompleteUsers) { + if (shutdownOnly) { + console.appendLog(Level.Info, "no sbt server is running. ciao") + System.exit(0) + } else if (promptCompleteUsers) { val msg = if (noTab) "" else "No sbt server is running. Press to start one..." errorStream.print(s"\n$msg") if (noStdErr) System.exit(0) diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 0b54ba2e5f..9ee85e2861 100644 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -1213,7 +1213,7 @@ object Defaults extends BuildCommon { for (lib <- scalaDeps.take(1)) { val libVer = lib.module.revision val libName = lib.module.name - val n = name.value + val proj = Def.displayBuildRelative(thisProjectRef.value.build, thisProjectRef.value) if (VersionNumber(sv).matchesSemVer(SemanticSelector(s"<$libVer"))) { val err = !allowUnsafeScalaLibUpgrade.value val fix = @@ -1227,13 +1227,13 @@ object Defaults extends BuildCommon { |Compilation (macro expansion) or using the Scala REPL in sbt may fail with a LinkageError.""".stripMargin val msg = - s"""Expected `$n/scalaVersion` to be $libVer or later, but found $sv. + s"""Expected `$proj scalaVersion` to be $libVer or later, but found $sv. |To support backwards-only binary compatibility (SIP-51), the Scala 2.13 compiler |should not be older than $libName on the dependency classpath. | |$fix | - |See `$n/evicted` to know why $libName $libVer is getting pulled in. + |See `$proj evicted` to know why $libName $libVer is getting pulled in. |""".stripMargin if (err) sys.error(msg) else s.log.warn(msg) @@ -1485,26 +1485,34 @@ object Defaults extends BuildCommon { if (stamps.isEmpty) Long.MinValue else stamps.max } - def intlStamp(c: String, analysis: Analysis, s: Set[String]): Long = { - if (s contains c) Long.MinValue + def intlStamp0(javaClassName: String, analysis: Analysis, alreadySeen: Set[String])( + className: String + ): Set[Long] = { + import analysis.{ apis, relations } + relations + .internalClassDeps(className) + .map(intlStamp(_, analysis, alreadySeen + javaClassName)) ++ + relations.externalDeps(className).map(stamp) ++ + apis.internal.get(javaClassName).toSeq.map(_.compilationTimestamp) ++ + apis.internal.get(className).toSeq.map(_.compilationTimestamp) + } + def intlStamp(javaClassName: String, analysis: Analysis, alreadySeen: Set[String]): Long = + if (alreadySeen contains javaClassName) Long.MinValue else stamps.getOrElse( - c, { - val x = { - import analysis.{ apis, relations => rel } - rel.internalClassDeps(c).map(intlStamp(_, analysis, s + c)) ++ - rel.externalDeps(c).map(stamp) ++ - rel.productClassName.reverse(c).flatMap { pc => - apis.internal.get(pc).map(_.compilationTimestamp) - } + Long.MinValue + javaClassName, { + val x: Long = { + val classNames = analysis.relations.productClassName.reverse(javaClassName).toSeq + classNames.flatMap(intlStamp0(javaClassName, analysis, alreadySeen)) ++ Seq( + Long.MinValue + ) }.max if (x != Long.MinValue) { - stamps(c) = x + stamps(javaClassName) = x } x } ) - } def noSuccessYet(test: String) = succeeded.get(test) match { case None => true case Some(ts) => stamps.synchronized(stamp(test)) > ts diff --git a/main/src/main/scala/sbt/internal/server/BspCompileTask.scala b/main/src/main/scala/sbt/internal/server/BspCompileTask.scala index ed784f2441..b2aed4e55f 100644 --- a/main/src/main/scala/sbt/internal/server/BspCompileTask.scala +++ b/main/src/main/scala/sbt/internal/server/BspCompileTask.scala @@ -16,7 +16,6 @@ import sbt.internal.server.BspCompileTask.exchange import sbt.librarymanagement.Configuration import sbt.util.InterfaceUtil import sjsonnew.support.scalajson.unsafe.Converter -import xsbti.CompileCancelled import xsbti.CompileFailed import xsbti.Problem import xsbti.Severity @@ -39,7 +38,7 @@ object BspCompileTask { val task = BspCompileTask(targetId, project, config, ci) try { task.notifyStart() - val result = Retry(compile(task), classOf[CompileCancelled], classOf[CompileFailed]) + val result = Retry.io(compile(task)) task.notifySuccess(result) result } catch { diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 8e040b7e50..f3ef989a25 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -12,7 +12,7 @@ object Dependencies { sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version") // sbt modules - private val ioVersion = nightlyVersion.getOrElse("1.10.4") + private val ioVersion = nightlyVersion.getOrElse("1.10.5") private val lmVersion = sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.10.4") val zincVersion = nightlyVersion.getOrElse("1.10.8") @@ -77,7 +77,7 @@ object Dependencies { def addSbtZincCompile = addSbtModule(sbtZincPath, "zincCompile", zincCompile) def addSbtZincCompileCore = addSbtModule(sbtZincPath, "zincCompileCore", zincCompileCore) - val lmCoursierShaded = "io.get-coursier" %% "lm-coursier-shaded" % "2.1.7" + val lmCoursierShaded = "io.get-coursier" %% "lm-coursier-shaded" % "2.1.8" def sjsonNew(n: String) = Def.setting("com.eed3si9n" %% n % "0.10.1") // contrabandSjsonNewVersion.value diff --git a/sbt b/sbt index c8176a38f2..d5312ce355 100755 --- a/sbt +++ b/sbt @@ -1,7 +1,7 @@ #!/usr/bin/env bash set +e -declare builtin_sbt_version="1.10.10" +declare builtin_sbt_version="1.10.11" declare -a residual_args declare -a java_args declare -a scalac_args @@ -26,6 +26,7 @@ declare no_server= declare sbtn_command="$SBTN_CMD" declare sbtn_version="1.10.8" declare use_colors=1 +declare is_this_dir_sbt="" ### ------------------------------- ### ### Helper methods for BASH scripts ### @@ -160,7 +161,7 @@ acquire_sbt_jar () { sbt_jar="$download_jar" else sbt_url=$(jar_url "$launcher_sv") - echoerr "downloading sbt launcher $launcher_sv" + dlog "downloading sbt launcher $launcher_sv" download_url "$sbt_url" "${download_jar}.temp" download_url "${sbt_url}.sha1" "${download_jar}.sha1" if command -v shasum > /dev/null; then @@ -196,7 +197,7 @@ acquire_sbtn () { archive_target="$p/sbtn-${arch}-pc-linux-${sbtn_v}.tar.gz" url="https://github.com/sbt/sbtn-dist/releases/download/v${sbtn_v}/sbtn-${arch}-pc-linux-${sbtn_v}.tar.gz" else - echoerr "sbtn is not supported on $arch" + echoerr_error "sbtn is not supported on $arch" exit 2 fi elif [[ "$OSTYPE" == "darwin"* ]]; then @@ -208,14 +209,14 @@ acquire_sbtn () { archive_target="$p/sbtn-x86_64-pc-win32-${sbtn_v}.zip" url="https://github.com/sbt/sbtn-dist/releases/download/v${sbtn_v}/sbtn-x86_64-pc-win32-${sbtn_v}.zip" else - echoerr "sbtn is not supported on $OSTYPE" + echoerr_error "sbtn is not supported on $OSTYPE" exit 2 fi if [[ -f "$target" ]]; then sbtn_command="$target" else - echoerr "downloading sbtn ${sbtn_v} for ${arch}" + dlog "downloading sbtn ${sbtn_v} for ${arch}" download_url "$url" "$archive_target" if [[ "$OSTYPE" == "linux-gnu"* ]] || [[ "$OSTYPE" == "darwin"* ]]; then tar zxf "$archive_target" --directory "$p" @@ -350,7 +351,7 @@ require_arg () { local opt="$2" local arg="$3" if [[ -z "$arg" ]] || [[ "${arg:0:1}" == "-" ]]; then - echo "$opt requires <$type> argument" + echoerr "$opt requires <$type> argument" exit 1 fi } @@ -454,19 +455,19 @@ checkJava() { # Now check to see if it's a good enough version local good_enough="$(expr $java_version ">=" $required_version)" if [[ "$java_version" == "" ]]; then - echo - echo "No Java Development Kit (JDK) installation was detected." - echo Please go to http://www.oracle.com/technetwork/java/javase/downloads/ and download. - echo + echoerr + echoerr "No Java Development Kit (JDK) installation was detected." + echoerr Go to https://adoptium.net/ etc and download. + echoerr exit 1 elif [[ "$good_enough" != "1" ]]; then - echo - echo "The Java Development Kit (JDK) installation you have is not up to date." - echo $script_name requires at least version $required_version+, you have - echo version $java_version - echo - echo Please go to http://www.oracle.com/technetwork/java/javase/downloads/ and download - echo a valid JDK and install before running $script_name. + echoerr + echoerr "The Java Development Kit (JDK) installation you have is not up to date." + echoerr $script_name requires at least version $required_version+, you have + echoerr version $java_version + echoerr + echoerr Go to https://adoptium.net/ etc and download + echoerr a valid JDK and install before running $script_name. echo exit 1 fi @@ -481,7 +482,6 @@ copyRt() { java9_rt=$(echo "$java9_ext/rt.jar") vlog "[copyRt] java9_rt = '$java9_rt'" if [[ ! -f "$java9_rt" ]]; then - echo copying runtime jar... mkdir -p "$java9_ext" "$java_cmd" \ "${sbt_options[@]}" \ @@ -494,11 +494,17 @@ copyRt() { fi } +detect_working_directory() { + if [[ -f ./build.sbt || -f ./project/build.properties ]]; then + is_this_dir_sbt=1 + fi +} + # Confirm a user's intent if the current directory does not look like an sbt # top-level directory and neither the --allow-empty option nor the "new" command was given. checkWorkingDirectory() { if [[ ! -n "$allow_empty" ]]; then - [[ -f ./build.sbt || -d ./project || -n "$sbt_new" ]] || { + [[ -n "$is_this_dir_sbt" || -n "$sbt_new" ]] || { echoerr_error "Neither build.sbt nor a 'project' directory in the current directory: $(pwd)" echoerr_error "run 'sbt new', touch build.sbt, or run 'sbt --allow-empty'." echoerr_error "" @@ -531,19 +537,25 @@ run() { addJava "-Dsbt.cygwin=true" fi + detect_working_directory if [[ $print_sbt_version ]]; then execRunner "$java_cmd" -jar "$sbt_jar" "sbtVersion" | tail -1 | sed -e 's/\[info\]//g' elif [[ $print_sbt_script_version ]]; then echo "$init_sbt_version" elif [[ $print_version ]]; then - execRunner "$java_cmd" -jar "$sbt_jar" "sbtVersion" | tail -1 | sed -e 's/\[info\]/sbt version in this project:/g' - echo "sbt script version: $init_sbt_version" + if [[ -n "$is_this_dir_sbt" ]]; then + execRunner "$java_cmd" -jar "$sbt_jar" "sbtVersion" | tail -1 | sed -e 's/\[info\]/sbt version in this project:/g' + fi + echo "sbt runner version: $init_sbt_version" + echoerr "" + echoerr "[info] sbt runner (sbt-the-shell-script) is a runner to run any declared version of sbt." + echoerr "[info] Actual version of the sbt is declared using project/build.properties for each build." elif [[ $shutdownall ]]; then local sbt_processes=( $(jps -v | grep sbt-launch | cut -f1 -d ' ') ) for procId in "${sbt_processes[@]}"; do kill -9 $procId done - echo "shutdown ${#sbt_processes[@]} sbt processes" + echoerr "shutdown ${#sbt_processes[@]} sbt processes" else checkWorkingDirectory # run sbt @@ -792,7 +804,12 @@ runNativeClient() { unset 'original_args[i]' fi done - sbt_script=$0 + + if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "win32" ]]; then + sbt_script="$0.bat" + else + sbt_script="$0" + fi sbt_script=${sbt_script/ /%20} execRunner "$sbtn_command" "--sbt-script=$sbt_script" "${original_args[@]}" } diff --git a/sbt-app/src/sbt-test/tests/incremental-object-deps/build.sbt b/sbt-app/src/sbt-test/tests/incremental-object-deps/build.sbt new file mode 100644 index 0000000000..d37f0123ee --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-deps/build.sbt @@ -0,0 +1,3 @@ +scalaVersion := "3.6.4" +libraryDependencies += "com.eed3si9n.verify" %% "verify" % "1.0.0" % Test +testFrameworks += new TestFramework("verify.runner.Framework") diff --git a/sbt-app/src/sbt-test/tests/incremental-object-deps/changes/B.scala b/sbt-app/src/sbt-test/tests/incremental-object-deps/changes/B.scala new file mode 100644 index 0000000000..6d58d7cdaa --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-deps/changes/B.scala @@ -0,0 +1,4 @@ +package example + +object B: + def bbb: String = "3" diff --git a/sbt-app/src/sbt-test/tests/incremental-object-deps/src/main/scala/example/A.scala b/sbt-app/src/sbt-test/tests/incremental-object-deps/src/main/scala/example/A.scala new file mode 100644 index 0000000000..e935ad4e3d --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-deps/src/main/scala/example/A.scala @@ -0,0 +1,4 @@ +package example + +object A: + def aaa: String = B.bbb diff --git a/sbt-app/src/sbt-test/tests/incremental-object-deps/src/main/scala/example/B.scala b/sbt-app/src/sbt-test/tests/incremental-object-deps/src/main/scala/example/B.scala new file mode 100644 index 0000000000..778ef9fddc --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-deps/src/main/scala/example/B.scala @@ -0,0 +1,4 @@ +package example + +object B: + def bbb: String = "2" diff --git a/sbt-app/src/sbt-test/tests/incremental-object-deps/src/test/scala/example/ATest.scala b/sbt-app/src/sbt-test/tests/incremental-object-deps/src/test/scala/example/ATest.scala new file mode 100644 index 0000000000..5852441555 --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-deps/src/test/scala/example/ATest.scala @@ -0,0 +1,7 @@ +package example + +object ATest extends verify.BasicTestSuite: + test("aaa ") { + assert(A.aaa == "2") + } +end ATest diff --git a/sbt-app/src/sbt-test/tests/incremental-object-deps/test b/sbt-app/src/sbt-test/tests/incremental-object-deps/test new file mode 100644 index 0000000000..1938dc3218 --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-deps/test @@ -0,0 +1,6 @@ +> debug +> testQuick +$ sleep 2000 +$ copy-file changes/B.scala src/main/scala/example/B.scala + +-> testQuick diff --git a/sbt-app/src/sbt-test/tests/incremental-object-sources/build.sbt b/sbt-app/src/sbt-test/tests/incremental-object-sources/build.sbt new file mode 100644 index 0000000000..5d582f2370 --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-sources/build.sbt @@ -0,0 +1,10 @@ +// Global / cacheStores := Seq.empty + +val scalatest = "org.scalatest" %% "scalatest" % "3.0.5" +scalaVersion := "2.12.20" + +lazy val root = (project in file(".")) + .settings( + libraryDependencies += scalatest % Test, + Test / parallelExecution := false + ) diff --git a/sbt-app/src/sbt-test/tests/test-quick/changed/MathFunction.scala b/sbt-app/src/sbt-test/tests/incremental-object-sources/changed/MathFunction.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/changed/MathFunction.scala rename to sbt-app/src/sbt-test/tests/incremental-object-sources/changed/MathFunction.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/src/main/scala/MathFunction.scala b/sbt-app/src/sbt-test/tests/incremental-object-sources/src/main/scala/MathFunction.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/src/main/scala/MathFunction.scala rename to sbt-app/src/sbt-test/tests/incremental-object-sources/src/main/scala/MathFunction.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/src/test/scala/MathFunctionSpec.scala b/sbt-app/src/sbt-test/tests/incremental-object-sources/src/test/scala/MathFunctionSpec.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/src/test/scala/MathFunctionSpec.scala rename to sbt-app/src/sbt-test/tests/incremental-object-sources/src/test/scala/MathFunctionSpec.scala diff --git a/sbt-app/src/sbt-test/tests/incremental-object-sources/test b/sbt-app/src/sbt-test/tests/incremental-object-sources/test new file mode 100644 index 0000000000..b6c0cee18b --- /dev/null +++ b/sbt-app/src/sbt-test/tests/incremental-object-sources/test @@ -0,0 +1,8 @@ +> testQuick + +# https://github.com/sbt/sbt/issues/5504 +$ copy-file changed/MathFunction.scala src/test/scala/MathFunction.scala +> compile +$ sleep 2000 +> debug +-> testQuick MathFunctionTest diff --git a/sbt-app/src/sbt-test/tests/test-quick/build.sbt b/sbt-app/src/sbt-test/tests/incremental/build.sbt similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/build.sbt rename to sbt-app/src/sbt-test/tests/incremental/build.sbt diff --git a/sbt-app/src/sbt-test/tests/test-quick/changed/A.scala b/sbt-app/src/sbt-test/tests/incremental/changed/A.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/changed/A.scala rename to sbt-app/src/sbt-test/tests/incremental/changed/A.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/changed/B.scala b/sbt-app/src/sbt-test/tests/incremental/changed/B.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/changed/B.scala rename to sbt-app/src/sbt-test/tests/incremental/changed/B.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/changed/Base.scala b/sbt-app/src/sbt-test/tests/incremental/changed/Base.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/changed/Base.scala rename to sbt-app/src/sbt-test/tests/incremental/changed/Base.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/src/main/scala/A.scala b/sbt-app/src/sbt-test/tests/incremental/src/main/scala/A.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/src/main/scala/A.scala rename to sbt-app/src/sbt-test/tests/incremental/src/main/scala/A.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/src/main/scala/B.scala b/sbt-app/src/sbt-test/tests/incremental/src/main/scala/B.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/src/main/scala/B.scala rename to sbt-app/src/sbt-test/tests/incremental/src/main/scala/B.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/src/test/scala/Base.scala b/sbt-app/src/sbt-test/tests/incremental/src/test/scala/Base.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/src/test/scala/Base.scala rename to sbt-app/src/sbt-test/tests/incremental/src/test/scala/Base.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/src/test/scala/Create.scala b/sbt-app/src/sbt-test/tests/incremental/src/test/scala/Create.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/src/test/scala/Create.scala rename to sbt-app/src/sbt-test/tests/incremental/src/test/scala/Create.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/src/test/scala/Delete.scala b/sbt-app/src/sbt-test/tests/incremental/src/test/scala/Delete.scala similarity index 100% rename from sbt-app/src/sbt-test/tests/test-quick/src/test/scala/Delete.scala rename to sbt-app/src/sbt-test/tests/incremental/src/test/scala/Delete.scala diff --git a/sbt-app/src/sbt-test/tests/test-quick/test b/sbt-app/src/sbt-test/tests/incremental/test similarity index 80% rename from sbt-app/src/sbt-test/tests/test-quick/test rename to sbt-app/src/sbt-test/tests/incremental/test index c86f0276f0..72891032f7 100644 --- a/sbt-app/src/sbt-test/tests/test-quick/test +++ b/sbt-app/src/sbt-test/tests/incremental/test @@ -27,14 +27,8 @@ $ sleep 2000 # src/test compilation group change. $ copy-file changed/Base.scala src/test/scala/Base.scala -> test:compile +> Test/compile $ sleep 2000 -> testQuick Create > testQuick Delete > testQuick Create - -# https://github.com/sbt/sbt/issues/5504 -$ copy-file changed/MathFunction.scala src/test/scala/MathFunction.scala -> compile -$ sleep 2000 --> testQuick MathFunctionTest