diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index a58675259..000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,162 +0,0 @@ -image: - - MacOS - - Visual Studio 2015 - - Visual Studio 2019 - - Ubuntu - -build: off - -init: - - git config --global core.autocrlf input - -for: -- - matrix: - only: - - image: Ubuntu - - branches: - only: - - build-graal - artifacts: - - path: client/target/bin/sbtn - name: sbtn - - install: - - curl -sL https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.tgz > ~/sbt-bin.tgz - - mkdir ~/sbt - - tar -xf ~/sbt-bin.tgz --directory ~/sbt - - curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh - - jabba install adopt@1.8.0-275 - - jabba use adopt@1.8.0-275 - - curl -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.1.0/graalvm-ce-java8-linux-amd64-20.1.0.tar.gz > graalvm.tar.gz - - tar -xf graalvm.tar.gz - - export PATH="~/sbt/sbt/bin:$PATH" - - export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-275/bin" - - export JAVA_HOME="~/.jabba/jdk/adopt@1.8.0-275" - - test_script: - - export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-275/bin" - - export PATH="$PATH:graalvm-ce-java8-20.1.0/bin" - - gu install native-image - - sbt "-Dsbt.io.virtual=false" "-Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/bin/native-image" "sbtClientProj/buildNativeThinClient" - -- - matrix: - only: - - image: MacOS - - branches: - only: - - build-graal - artifacts: - - path: client/target/bin/sbtn - name: mac-native-sbt-client - - install: - - curl -sL https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.tgz > ~/sbt-bin.tgz - - mkdir ~/sbt - - tar -xf ~/sbt-bin.tgz --directory ~/sbt - - curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh - - jabba install adopt@1.8.0-222 - - jabba use adopt@1.8.0-222 - - curl -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.1.0/graalvm-ce-java8-darwin-amd64-20.1.0.tar.gz > graalvm.tar.gz - - tar -xf graalvm.tar.gz - - export PATH="~/sbt/sbt/bin:$PATH" - - export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/bin" - - export JAVA_HOME="~/.jabba/jdk/adopt@1.8.0-222" - - test_script: - - export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/Contents/Home/bin" - - export PATH="$PATH:graalvm-ce-java8-20.1.0/Contents/Home/bin" - - gu install native-image - - sbt "-Dsbt.io.virtual=false" "-Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/Contents/Home/bin/native-image" "sbtClientProj/buildNativeThinClient" - -- - matrix: - only: - - image: Visual Studio 2015 - branches: - only: - - build-graal - - artifacts: - - path: client\target\bin\sbtn.exe - name: sbtn.exe - install: - - cinst adoptopenjdk8 -params 'installdir=C:\\jdk8' - - SET CI=true - #- choco install windows-sdk-7.1 kb2519277 - - call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" - - - ps: | - Add-Type -AssemblyName System.IO.Compression.FileSystem - if (!(Test-Path -Path "C:\sbt" )) { - (new-object System.Net.WebClient).DownloadFile( - 'https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.zip', - 'C:\sbt-bin.zip' - ) - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sbt-bin.zip", "C:\sbt") - } - if (!(Test-Path -Path "C:\graalvm-ce-java8-20.2.0-dev" )) { - (new-object System.Net.WebClient).DownloadFile( - 'https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.1.0/graalvm-ce-java8-windows-amd64-20.1.0.zip', - 'C:\graalvm-ce-java8-20.1.0.zip' - ) - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\graalvm-ce-java8-20.1.0.zip", "C:\") - } - if (!(Test-Path -Path "C:\zulu-jdk7" )) { - (new-object System.Net.WebClient).DownloadFile( - 'https://cdn.azul.com/zulu/bin/zulu7.38.0.11-ca-jdk7.0.262-win_x64.zip', - 'C:\zulu-jdk7.zip' - ) - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\zulu-jdk7.zip", "C:\") - } - - SET PATH=C:\graalvm-ce-java8-20.1.0\bin;%PATH% - - SET PATH=C:\sbt\sbt\bin;%PATH% - - SET JAVA_HOME=C:\jdk8 - - gu install native-image - - rm .sbtopts - - cache: - - '%USERPROFILE%\.ivy2\cache' - - '%LOCALAPPDATA%\Coursier\Cache\v1' - - '%USERPROFILE%\.sbt' - - test_script: - - sbt "-Dsbt.io.virtual=false" "-Dsbt.native-image=C:\graalvm-ce-java8-20.1.0\bin\native-image.cmd" "sbtClientProj/buildNativeThinClient" -- - matrix: - only: - - image: Visual Studio 2019 - branches: - except: - - build-graal - install: - - cinst adoptopenjdk8 -params 'installdir=C:\\jdk8' - - SET JAVA_HOME=C:\jdk8 - - SET PATH=C:\jdk8\bin;%PATH% - - SET CI=true - - - ps: | - Add-Type -AssemblyName System.IO.Compression.FileSystem - if (!(Test-Path -Path "C:\sbt" )) { - (new-object System.Net.WebClient).DownloadFile( - 'https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.zip', - 'C:\sbt-bin.zip' - ) - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sbt-bin.zip", "C:\sbt") - } - - SET PATH=C:\sbt\sbt\bin;%PATH% - - SET SBT_OPTS=-Xmx4g -Dsbt.supershell=never -Dfile.encoding=UTF8 - - rm .sbtopts - - cache: - - '%USERPROFILE%\.ivy2\cache' - - '%LOCALAPPDATA%\Coursier\Cache\v1' - - '%USERPROFILE%\.sbt' - - test_script: - # The server tests often fail in CI when run together so just run a single test to ensure - # that the thin client works on windows - - sbt "-Dsbt.io.virtual=false" "scripted actions/* reporter/source-mapper classloader-cache/* nio/* watch/*" "serverTestProj/testOnly testpkg.ClientTest" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a9f6e365..b4c2e80db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: java: 8 distribution: adopt jobtype: 8 - - os: windows-latest + - os: windows-2019 java: 8 distribution: adopt jobtype: 9 @@ -95,6 +95,9 @@ jobs: with: path: ~/.sbt key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: Setup Windows C++ toolchain + uses: ilammy/msvc-dev-cmd@v1 + if: ${{ matrix.os == 'windows-2019' }} - name: Build and test (1) if: ${{ matrix.jobtype == 1 }} shell: bash @@ -107,7 +110,6 @@ jobs: ./sbt -v --client serverTestProj/scalafmtCheckAll ./sbt -v --client headerCheck ./sbt -v --client "Test/headerCheck" - ./sbt -v --client whitesourceOnPush ./sbt -v --client "Test/compile" ./sbt -v --client publishLocal ./sbt -v --client test @@ -152,6 +154,8 @@ jobs: if: ${{ matrix.jobtype == 7 }} shell: bash run: | + # test building sbtn on Linux + sbt "-Dsbt.io.virtual=false" nativeImage # test launcher script echo build using JDK 8 test using JDK 8 and JDK 11 cd launcher-package @@ -165,6 +169,8 @@ jobs: if: ${{ matrix.jobtype == 8 }} shell: bash run: | + # test building sbtn on macOS + sbt "-Dsbt.io.virtual=false" nativeImage # test launcher script echo build using JDK 8, test using JDK 8, on macOS cd launcher-package @@ -175,6 +181,8 @@ jobs: if: ${{ matrix.jobtype == 9 }} shell: bash run: | + # test building sbtn on Windows + sbt "-Dsbt.io.virtual=false" nativeImage # test launcher script echo build using JDK 8, test using JDK 8, on Windows cd launcher-package diff --git a/.github/workflows/dependency-graph.yml b/.github/workflows/dependency-graph.yml new file mode 100644 index 000000000..7caea8278 --- /dev/null +++ b/.github/workflows/dependency-graph.yml @@ -0,0 +1,12 @@ +# .github/workflows/dependency-graph.yml +name: Submit Dependency Graph +on: + push: + branches: [1.7.x] # default branch of the project +jobs: + submit-graph: + name: Submit Dependency Graph + runs-on: ubuntu-latest # or windows-latest, or macOS-latest + steps: + - uses: actions/checkout@v3 + - uses: scalacenter/sbt-dependency-submission@v2 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4d98a29d8..2897d641f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,8 +1,9 @@ name: Nightly on: - schedule: - # 08:00 UTC = 03:00 EST - - cron: '0 8 * * *' + workflow_dispatch: +# schedule: +# # 08:00 UTC = 03:00 EST +# - cron: '0 8 * * *' jobs: deploy: diff --git a/README.md b/README.md index 990d6c676..b169ba27d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![CI](https://github.com/sbt/sbt/actions/workflows/ci.yml/badge.svg)](https://github.com/sbt/sbt/actions/workflows/ci.yml) [![Latest version](https://img.shields.io/github/tag/sbt/sbt.svg)](https://index.scala-lang.org/sbt/sbt) -[![Gitter Chat](https://badges.gitter.im/sbt/sbt.svg)](https://gitter.im/sbt/sbt) +[![Discord](https://img.shields.io/discord/632150470000902164?label=Discord%20%23sbt)](https://discord.com/channels/632150470000902164/922600050989875282) [sbt/sbt-zero-seven]: https://github.com/sbt/sbt-zero-seven [CONTRIBUTING]: CONTRIBUTING.md diff --git a/build.sbt b/build.sbt index 3168ba1dd..8ffea7edc 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ import scala.util.Try // ThisBuild settings take lower precedence, // but can be shared across the multi projects. ThisBuild / version := { - val v = "1.7.0-SNAPSHOT" + val v = "1.7.2-SNAPSHOT" nightlyVersion.getOrElse(v) } ThisBuild / version2_13 := "2.0.0-SNAPSHOT" @@ -50,7 +50,6 @@ Global / semanticdbVersion := "4.5.9" val excludeLint = SettingKey[Set[Def.KeyedInitialize[_]]]("excludeLintKeys") Global / excludeLint := (Global / excludeLint).?.value.getOrElse(Set.empty) Global / excludeLint += componentID -Global / excludeLint += whitesourceIgnoredScopes Global / excludeLint += scriptedBufferLog Global / excludeLint += checkPluginCross @@ -129,6 +128,8 @@ val sbt13Plus = "1.3.0", "1.4.0", "1.5.0", + "1.6.0", + "1.7.0", ) val sbt10Plus = Seq( @@ -211,7 +212,7 @@ lazy val sbtRoot: Project = (project in file(".")) mimaSettings, mimaPreviousArtifacts := Set.empty, buildThinClient := (sbtClientProj / buildThinClient).evaluated, - buildNativeThinClient := (sbtClientProj / buildNativeThinClient).value, + nativeImage := (sbtClientProj / nativeImage).value, installNativeThinClient := { // nativeInstallDirectory can be set globally or in a gitignored local file val dir = nativeInstallDirectory.?.value @@ -226,7 +227,7 @@ lazy val sbtRoot: Project = (project in file(".")) } } val base = baseDirectory.value.toPath - val exec = (sbtClientProj / buildNativeThinClient).value + val exec = (sbtClientProj / nativeImage).value.toPath streams.value.log.info(s"installing thin client ${base.relativize(exec)} to ${target}") Files.copy(exec, target, java.nio.file.StandardCopyOption.REPLACE_EXISTING) } @@ -246,6 +247,7 @@ lazy val bundledLauncherProj = description := "sbt application launcher", autoScalaLibrary := false, crossPaths := false, + Compile / doc / javacOptions := Nil, Compile / packageBin := sbtLaunchJar.value, mimaSettings, mimaPreviousArtifacts := Set() @@ -340,6 +342,7 @@ lazy val utilInterface = (project in file("internal") / "util-interface").settin javaOnlySettings, crossPaths := false, autoScalaLibrary := false, + Compile / doc / javacOptions := Nil, name := "Util Interface", exportJars := true, utilMimaSettings, @@ -532,6 +535,7 @@ lazy val testAgentProj = (project in file("testing") / "agent") crossScalaVersions := Seq(baseScalaVersion), crossPaths := false, autoScalaLibrary := false, + Compile / doc / javacOptions := Nil, name := "Test Agent", libraryDependencies += testInterface, mimaSettings, @@ -618,6 +622,7 @@ lazy val scriptedSbtReduxProj = (project in file("scripted-sbt-redux")) .dependsOn(sbtProj % "compile;test->test", commandProj, utilLogging, utilScripted) .settings( baseSettings, + crossScalaVersions := Seq(baseScalaVersion), name := "Scripted sbt Redux", libraryDependencies ++= Seq(launcherInterface % "provided"), mimaSettings, @@ -629,6 +634,7 @@ lazy val scriptedSbtOldProj = (project in file("scripted-sbt-old")) .dependsOn(scriptedSbtReduxProj) .settings( baseSettings, + crossScalaVersions := Seq(baseScalaVersion), name := "Scripted sbt", mimaSettings, mimaBinaryIssueFilters ++= Seq( @@ -656,6 +662,7 @@ lazy val dependencyTreeProj = (project in file("dependency-tree")) .settings( sbtPlugin := true, baseSettings, + crossScalaVersions := Seq(baseScalaVersion), name := "sbt-dependency-tree", publishMavenStyle := true, // mimaSettings, @@ -1140,17 +1147,11 @@ lazy val serverTestProj = (project in file("server-test")) val isWin = scala.util.Properties.isWin val buildThinClient = inputKey[JPath]("generate a java implementation of the thin client") -val thinClientClasspath = - taskKey[Seq[JPath]]("Generate the classpath for thin client (compacted for windows)") -val thinClientNativeImageCommand = taskKey[String]("The native image command") -val thinClientNativeImageOptions = settingKey[Seq[String]]("The native image options") -val thinClientNativeImageClass = settingKey[String]("The class for the native image") -val buildNativeThinClient = taskKey[JPath]("Generate a native executable") // Use a TaskKey rather than SettingKey for nativeInstallDirectory so it can left unset by default val nativeInstallDirectory = taskKey[JPath]("The install directory for the native executable") val installNativeThinClient = inputKey[JPath]("Install the native executable") -val nativeThinClientPath = settingKey[JPath]("The location of the native executable") lazy val sbtClientProj = (project in file("client")) + .enablePlugins(NativeImagePlugin) .dependsOn(commandProj) .settings( commonBaseSettings, @@ -1161,65 +1162,16 @@ lazy val sbtClientProj = (project in file("client")) crossPaths := false, exportJars := true, libraryDependencies += jansi, - libraryDependencies += scalatest % "test", - /* - * On windows, the raw classpath is too large to be a command argument to an - * external process so we create symbolic links with short names to get the - * classpath length under the limit. - */ - thinClientClasspath := { - val original = (Compile / fullClasspathAsJars).value.map(_.data) - val outputDir = target.value / "thinclientcp" - IO.createDirectory(outputDir) - Files.walk(outputDir.toPath).forEach { - case f if f.getFileName.toString.endsWith(".jar") => Files.deleteIfExists(f) - case _ => - } - original.zipWithIndex.map { - case (f, i) => Files.createSymbolicLink(outputDir.toPath / s"$i.jar", f.toPath) - } + libraryDependencies += scalatest % Test, + Compile / mainClass := Some("sbt.client.Client"), + nativeImageReady := { () => + () }, - thinClientNativeImageCommand := System.getProperty("sbt.native-image", "native-image").toString, - buildNativeThinClient / name := s"sbtn${if (isWin) ".exe" else ""}", - nativeThinClientPath := target.value.toPath / "bin" / (buildNativeThinClient / name).value, - thinClientNativeImageClass := "sbt.client.Client", - buildNativeThinClient := { - val hasChanges = thinClientClasspath.outputFileChanges.hasChanges - val cpString = - thinClientClasspath.value.map(_.getFileName).mkString(java.io.File.pathSeparator) - val prefix = Seq(thinClientNativeImageCommand.value, "-cp", cpString) - val full = prefix ++ thinClientNativeImageOptions.value :+ thinClientNativeImageClass.value - val dir = target.value - if (hasChanges || !Files.exists(nativeThinClientPath.value)) { - val pb = new java.lang.ProcessBuilder(full: _*) - pb.directory(dir / "thinclientcp") - val proc = pb.start() - val thread = new Thread { - setDaemon(true) - val is = proc.getInputStream - val es = proc.getErrorStream - - override def run(): Unit = { - Thread.sleep(100) - while (proc.isAlive) { - if (is.available > 0 || es.available > 0) { - while (is.available > 0) System.out.print(is.read.toChar) - while (es.available > 0) System.err.print(es.read.toChar) - } - if (proc.isAlive) Thread.sleep(10) - } - } - } - thread.start() - proc.waitFor(5, java.util.concurrent.TimeUnit.MINUTES) - assert(proc.exitValue == 0, s"Exit value ${proc.exitValue} was nonzero") - } - nativeThinClientPath.value - }, - thinClientNativeImageOptions := Seq( + nativeImageOutput := target.value / "bin" / "sbtn", + nativeImageOptions ++= Seq( "--no-fallback", s"--initialize-at-run-time=sbt.client", - "--verbose", + // "--verbose", "-H:IncludeResourceBundles=jline.console.completer.CandidateListCompletionHandler", "-H:+ReportExceptionStackTraces", "-H:-ParseRuntimeOptions", @@ -1506,15 +1458,6 @@ def customCommands: Seq[Setting[_]] = Seq( s"""set scalaVersion in ThisBuild := "$scala212" """ :: state }, - commands += Command.command("whitesourceOnPush") { state => - sys.env.get("TRAVIS_EVENT_TYPE") match { - case Some("push") => - "whitesourceCheckPolicies" :: - "whitesourceUpdate" :: - state - case _ => state - } - }, commands += Command.command("release-sbt-local") { state => "clean" :: "so compile" :: @@ -1571,24 +1514,3 @@ ThisBuild / publishTo := { Some("releases" at nexus + "service/local/staging/deploy/maven2") } ThisBuild / publishMavenStyle := true -ThisBuild / whitesourceProduct := "Lightbend Reactive Platform" -ThisBuild / whitesourceAggregateProjectName := { - // note this can get detached on tag build etc - val b = sys.process.Process("git rev-parse --abbrev-ref HEAD").!!.trim - val Stable = """1\.([0-9]+)\.x""".r - b match { - case Stable(y) => "sbt-1." + y.toString + "-stable" - case _ => "sbt-master" - } -} -ThisBuild / whitesourceAggregateProjectToken := { - (ThisBuild / whitesourceAggregateProjectName).value match { - case "sbt-master" => "e7a1e55518c0489a98e9c7430c8b2ccd53d9f97c12ed46148b592ebe4c8bf128" - case "sbt-1.3-stable" => "7e38cbb4d2fc4599835cd5d2cfb41b150597a4147b15424bb65841664ab2ec0d" - case "sbt-1.2-stable" => "54f2313767aa47198971e65595670ee16e1ad0000d20458588e72d3ac2c34763" - case _ => "" // it's ok to fail here - } -} -ThisBuild / whitesourceIgnoredScopes ++= Seq("plugin", "scalafmt", "sxr") -ThisBuild / whitesourceFailOnError := sys.env.contains("WHITESOURCE_PASSWORD") // fail if pwd is present -ThisBuild / whitesourceForceCheckAllDependencies := true diff --git a/internal/util-logging/src/main/scala/sbt/internal/util/Terminal.scala b/internal/util-logging/src/main/scala/sbt/internal/util/Terminal.scala index 9fa61c02e..0019b04e9 100644 --- a/internal/util-logging/src/main/scala/sbt/internal/util/Terminal.scala +++ b/internal/util-logging/src/main/scala/sbt/internal/util/Terminal.scala @@ -189,6 +189,14 @@ object Terminal { try Terminal.console.printStream.println(s"[info] $string") catch { case _: IOException => } } + + private[this] val writeLock = new AnyRef + def withWriteLock[A](f: => A): A = { + writeLock.synchronized { + f + } + } + private[sbt] def set(terminal: Terminal): Terminal = activeTerminal.getAndSet(terminal) implicit class TerminalOps(private val term: Terminal) extends AnyVal { def ansi(richString: => String, string: => String): String = @@ -462,7 +470,7 @@ object Terminal { val sepBytes = System.lineSeparator.getBytes("UTF-8") private class LinePrintStream(outputStream: OutputStream) extends PrintStream(outputStream, true) { - override def println(s: String): Unit = synchronized { + override def println(s: String): Unit = withWriteLock { out.write(s.getBytes("UTF-8") ++ sepBytes) out.flush() } @@ -667,7 +675,7 @@ object Terminal { } override def close(): Unit = if (running.compareAndSet(true, false)) this.interrupt() } - def read(): Int = { + override def read(): Int = { if (isScripted) -1 else if (bootInputStreamHolder.get == null) activeTerminal.get().inputStream.read() else { @@ -681,6 +689,13 @@ object Terminal { poll() } } + override def available(): Int = + if (isScripted) 0 + else + bootInputStreamHolder.get match { + case null => activeTerminal.get().inputStream.available() + case stream => stream.available() + activeTerminal.get().inputStream.available() + } } private[this] object proxyOutputStream extends OutputStream { private[this] def os: OutputStream = activeTerminal.get().outputStream @@ -911,7 +926,6 @@ object Terminal { override def getWidth: Int = getSize._1 override def getHeight: Int = getSize._2 private[this] val rawMode = new AtomicBoolean(false) - private[this] val writeLock = new AnyRef def throwIfClosed[R](f: => R): R = if (isStopped.get) throw new ClosedChannelException else f override def getLastLine: Option[String] = progressState.currentLine override def getLines: Seq[String] = progressState.getLines @@ -939,7 +953,7 @@ object Terminal { write(Array((b & 0xFF).toByte)) } override def write(b: Array[Byte]): Unit = throwIfClosed { - writeLock.synchronized(doWrite(b)) + withWriteLock(doWrite(b)) } override def write(b: Array[Byte], offset: Int, length: Int): Unit = throwIfClosed { write(Arrays.copyOfRange(b, offset, offset + length)) diff --git a/launcher-package/build.sbt b/launcher-package/build.sbt index b621c7695..6ccf65f27 100755 --- a/launcher-package/build.sbt +++ b/launcher-package/build.sbt @@ -119,7 +119,7 @@ val root = (project in file(".")). file }, // update sbt.sh at root - sbtnVersion := "1.4.7", + sbtnVersion := "1.7.0", sbtnJarsBaseUrl := "https://github.com/sbt/sbtn-dist/releases/download", sbtnJarsMappings := { val baseUrl = sbtnJarsBaseUrl.value diff --git a/main-command/src/main/java/sbt/internal/BootServerSocket.java b/main-command/src/main/java/sbt/internal/BootServerSocket.java index 5cf91dc50..a64c18951 100644 --- a/main-command/src/main/java/sbt/internal/BootServerSocket.java +++ b/main-command/src/main/java/sbt/internal/BootServerSocket.java @@ -310,7 +310,7 @@ public class BootServerSocket implements AutoCloseable { return "sbt-load" + hash; } else { final String alternativeSocketLocation = - System.getenv().getOrDefault("XDG_RUNTIME_DIR", "/tmp"); + System.getenv().getOrDefault("XDG_RUNTIME_DIR", System.getProperty("java.io.tmpdir")); final Path alternativeSocketLocationRoot = Paths.get(alternativeSocketLocation).resolve(".sbt"); final Path locationForSocket = alternativeSocketLocationRoot.resolve("sbt-socket" + hash); diff --git a/main/src/main/scala/sbt/Cross.scala b/main/src/main/scala/sbt/Cross.scala index 9966c5eb9..b6f8447d4 100644 --- a/main/src/main/scala/sbt/Cross.scala +++ b/main/src/main/scala/sbt/Cross.scala @@ -8,7 +8,6 @@ package sbt import java.io.File -import java.util.regex.Pattern import sbt.Def.{ ScopedKey, Setting } import sbt.Keys._ import sbt.SlashSyntax0._ @@ -16,10 +15,11 @@ import sbt.internal.Act import sbt.internal.CommandStrings._ import sbt.internal.inc.ScalaInstance import sbt.internal.util.AttributeKey +import sbt.internal.util.MessageOnlyException import sbt.internal.util.complete.DefaultParsers._ import sbt.internal.util.complete.{ DefaultParsers, Parser } import sbt.io.IO -import sbt.librarymanagement.CrossVersion +import sbt.librarymanagement.{ SemanticSelector, VersionNumber } /** * Cross implements the Scala cross building commands: @@ -295,7 +295,14 @@ object Cross { if (switch.version.force) { state.log.info(s"Forcing Scala version to $version on all projects.") } else { - state.log.info(s"Setting Scala version to $version on ${included.size} projects.") + included + .groupBy(_._2) + .foreach { + case (selectedVersion, projects) => + state.log.info( + s"Setting Scala version to $selectedVersion on ${projects.size} projects." + ) + } } if (excluded.nonEmpty && !switch.verbose) { state.log.info(s"Excluded ${excluded.size} projects, run ++ $version -v for more details.") @@ -327,10 +334,11 @@ object Cross { } ++ structure.units.keys .map(BuildRef.apply) .map(proj => (proj, Some(version), crossVersions(extracted, proj))) - } else if (version.contains('*')) { + } else { projectScalaVersions.map { case (project, scalaVersions) => - globFilter(version, scalaVersions) match { + val selector = SemanticSelector(version) + scalaVersions.filter(v => selector.matches(VersionNumber(v))) match { case Nil => (project, None, scalaVersions) case Seq(version) => (project, Some(version), scalaVersions) case multiple => @@ -339,15 +347,6 @@ object Cross { ) } } - } else { - val binaryVersion = CrossVersion.binaryScalaVersion(version) - projectScalaVersions.map { - case (project, scalaVersions) => - if (scalaVersions.exists(v => CrossVersion.binaryScalaVersion(v) == binaryVersion)) - (project, Some(version), scalaVersions) - else - (project, None, scalaVersions) - } } } @@ -359,10 +358,15 @@ object Cross { } if (included.isEmpty) { - sys.error( - s"""Switch failed: no subprojects list "$version" (or compatible version) in crossScalaVersions setting. - |If you want to force it regardless, call ++ $version!""".stripMargin - ) + if (isSelector(version)) + throw new MessageOnlyException( + s"""Switch failed: no subprojects have a version matching "$version" in the crossScalaVersions setting.""" + ) + else + throw new MessageOnlyException( + s"""Switch failed: no subprojects list "$version" (or compatible version) in crossScalaVersions setting. + |If you want to force it regardless, call ++ $version!""".stripMargin + ) } logSwitchInfo(included, excluded) @@ -370,19 +374,13 @@ object Cross { (setScalaVersionsForProjects(instance, included, state, extracted), included.map(_._1)) } - def globFilter(pattern: String, candidates: Seq[String]): Seq[String] = { - def createGlobRegex(remainingPattern: String): String = - remainingPattern.indexOf("*") match { - case -1 => Pattern.quote(remainingPattern) - case n => - val chunk = Pattern.quote(remainingPattern.substring(0, n)) + ".*" - if (remainingPattern.length > n) - chunk + createGlobRegex(remainingPattern.substring(n + 1)) - else chunk - } - val compiledPattern = Pattern.compile(createGlobRegex(pattern)) - candidates.filter(compiledPattern.matcher(_).matches()) - } + // determine whether this is a 'specific' version or a selector + // to be passed to SemanticSelector + private def isSelector(version: String): Boolean = + version.contains('*') || version.contains('x') || version.contains('X') || version.contains(' ') || + version.contains('<') || version.contains('>') || version.contains('|') || version.contains( + '=' + ) private def setScalaVersionsForProjects( instance: Option[(File, ScalaInstance)], diff --git a/main/src/main/scala/sbt/internal/Banner.scala b/main/src/main/scala/sbt/internal/Banner.scala index 0b5a25e71..24e3a9f6b 100644 --- a/main/src/main/scala/sbt/internal/Banner.scala +++ b/main/src/main/scala/sbt/internal/Banner.scala @@ -10,6 +10,15 @@ package sbt.internal private[sbt] object Banner { def apply(version: String): Option[String] = version match { + case v if v.startsWith("1.7.0") => + Some(s""" + |Here are some highlights of this release: + | - `++ ` updates + | - Scala 3 compiler error improvements + | - Improved Build Server Protocol (BSP) support + |See https://eed3si9n.com/sbt-1.7.0 for full release notes. + |Hide the banner for this release by running `skipBanner`. + |""".stripMargin.linesIterator.mkString("\n")) case v if v.startsWith("1.6.0") => Some(s""" |Here are some highlights of this release: diff --git a/main/src/main/scala/sbt/internal/CommandStrings.scala b/main/src/main/scala/sbt/internal/CommandStrings.scala index 439cdc295..97d97fa1b 100644 --- a/main/src/main/scala/sbt/internal/CommandStrings.scala +++ b/main/src/main/scala/sbt/internal/CommandStrings.scala @@ -374,17 +374,23 @@ $SwitchCommand [=][!] [-v] [] Uses the Scala installation at by configuring the scalaHome setting for all projects. - If is specified, it is used as the value of the scalaVersion setting. + If is specified, it is used to select the value of the scalaVersion setting + from one of the values of crossScalaVersions setting. This is important when using managed dependencies. This version will determine the cross-version used as well as transitive dependencies. - Only projects that are listed to be binary compatible with the selected Scala version + may be an actual Scala version such as 3.1.3, or a Semantic Version selector + pattern such as 2.13.x. Only subprojects that are listed to match the version pattern have their Scala version switched. If ! is supplied, then all projects projects have their Scala version switched. If -v is supplied, verbose logging of the Scala version switching is done. - If is provided, it is then executed. + If is provided, it is then executed. For example: + + ++ 2.13.x test + + The above will run test on all subprojects that contain a 2.13 Scala version. See also `help $CrossCommand` """ diff --git a/main/src/main/scala/sbt/internal/Load.scala b/main/src/main/scala/sbt/internal/Load.scala index 08965b0ce..834257634 100755 --- a/main/src/main/scala/sbt/internal/Load.scala +++ b/main/src/main/scala/sbt/internal/Load.scala @@ -101,10 +101,8 @@ private[sbt] object Load { val delegates = defaultDelegates val pluginMgmt = PluginManagement(loader) val inject = InjectSettings(injectGlobal(state), Nil, const(Nil)) - System.setProperty( - "swoval.tmpdir", - System.getProperty("swoval.tmpdir", globalBase.getAbsolutePath.toString) - ) + SysProp.setSwovalTempDir() + SysProp.setIpcSocketTempDir() LoadBuildConfiguration( stagingDirectory, classpath, diff --git a/main/src/main/scala/sbt/internal/SysProp.scala b/main/src/main/scala/sbt/internal/SysProp.scala index 737b0b368..ce5760edd 100644 --- a/main/src/main/scala/sbt/internal/SysProp.scala +++ b/main/src/main/scala/sbt/internal/SysProp.scala @@ -9,6 +9,7 @@ package sbt package internal import java.io.File +import java.nio.file.{ Path, Paths } import java.util.Locale import scala.util.control.NonFatal @@ -220,4 +221,33 @@ object SysProp { lazy val sbtCredentialsEnv: Option[Credentials] = sys.env.get("SBT_CREDENTIALS").map(raw => new FileCredentials(new File(raw))) + + private[sbt] def setSwovalTempDir(): Unit = { + val _ = getOrUpdateSwovalTmpDir( + runtimeDirectory.resolve("swoval").toString + ) + } + private[sbt] def setIpcSocketTempDir(): Unit = { + val _ = getOrUpdateIpcSocketTmpDir( + runtimeDirectory.resolve("ipcsocket").toString + ) + } + private[this] lazy val getOrUpdateSwovalTmpDir: String => String = + getOrUpdateSysProp("swoval.tmpdir")(_) + private[this] lazy val getOrUpdateIpcSocketTmpDir: String => String = + getOrUpdateSysProp("sbt.ipcsocket.tmpdir")(_) + private[this] def getOrUpdateSysProp(key: String)(value: String): String = { + val newVal = sys.props.getOrElse(key, value) + sys.props += (key -> newVal) + newVal + } + + /** + * This returns a temporary directory that is friendly to macOS, Linux, + * Windows, and Docker environment. + * Mostly these directories will be used as throw-away location to extract + * native files etc. + */ + private[this] def runtimeDirectory: Path = + Paths.get(sys.env.getOrElse("XDG_RUNTIME_DIR", sys.props("java.io.tmpdir"))).resolve(".sbt") } diff --git a/main/src/test/scala/sbt/CrossSpec.scala b/main/src/test/scala/sbt/CrossSpec.scala deleted file mode 100644 index 40673d548..000000000 --- a/main/src/test/scala/sbt/CrossSpec.scala +++ /dev/null @@ -1,20 +0,0 @@ -/* - * sbt - * Copyright 2011 - 2018, Lightbend, Inc. - * Copyright 2008 - 2010, Mark Harrah - * Licensed under Apache License 2.0 (see LICENSE) - */ - -package sbt - -object CrossSpec extends verify.BasicTestSuite { - import Cross._ - - test("glob filter should work as expected") { - assert(globFilter("2.13.*", Seq("2.12.8", "2.13.16", "3.0.1")) == Seq("2.13.16")) - assert(globFilter("3.*", Seq("2.12.8", "2.13.16", "3.0.1")) == Seq("3.0.1")) - assert(globFilter("3.*", Seq("3.0.1", "30.1")) == Seq("3.0.1")) - assert(globFilter("2.*", Seq("2.12.8", "2.13.16", "3.0.1")) == Seq("2.12.8", "2.13.16")) - assert(globFilter("4.*", Seq("2.12.8", "2.13.16", "3.0.1")) == Nil) - } -} diff --git a/notes/1.7.0/cross-strict-aggregation-scala-3.md b/notes/1.7.0/cross-strict-aggregation-scala-3.md new file mode 100644 index 000000000..8e00c2422 --- /dev/null +++ b/notes/1.7.0/cross-strict-aggregation-scala-3.md @@ -0,0 +1,8 @@ +[@ruippeixotog]: https://github.com/ruippeixotog + +[#6915]: https://github.com/sbt/sbt/issues/6915 +[#6926]: https://github.com/sbt/sbt/pull/6926 + +### Bug Fixes + +- Make `++ ` run `` only on compatible Scala 3 subprojects. [#6915][]/[#6926][] by [@ruippeixotog][] diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 368646ed4..86df2e8ef 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -12,10 +12,10 @@ object Dependencies { sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version") // sbt modules - private val ioVersion = nightlyVersion.getOrElse("1.6.0") + private val ioVersion = nightlyVersion.getOrElse("1.7.0") private val lmVersion = - sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.7.0-M1") - val zincVersion = nightlyVersion.getOrElse("1.7.0-M2") + sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.7.0") + val zincVersion = nightlyVersion.getOrElse("1.7.1") private val sbtIO = "org.scala-sbt" %% "io" % ioVersion @@ -26,7 +26,7 @@ object Dependencies { val launcherInterface = "org.scala-sbt" % "launcher-interface" % launcherVersion val rawLauncher = "org.scala-sbt" % "launcher" % launcherVersion val testInterface = "org.scala-sbt" % "test-interface" % "1.0" - val ipcSocket = "org.scala-sbt.ipcsocket" % "ipcsocket" % "1.3.1" + val ipcSocket = "org.scala-sbt.ipcsocket" % "ipcsocket" % "1.5.0" private val compilerInterface = "org.scala-sbt" % "compiler-interface" % zincVersion private val compilerClasspath = "org.scala-sbt" %% "zinc-classpath" % zincVersion diff --git a/project/build.properties b/project/build.properties index c8fcab543..5b12c1dc6 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.7.0 diff --git a/project/plugins.sbt b/project/plugins.sbt index 00c24984e..28508259b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,8 +7,8 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.0") addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.5.1") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.5") -addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.14") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1") addSbtPlugin("com.swoval" % "sbt-java-format" % "0.3.1") +addSbtPlugin("org.scalameta" % "sbt-native-image" % "0.3.1") addDependencyTreePlugin diff --git a/sbt b/sbt index 97afb370d..db84d8d7c 100755 --- a/sbt +++ b/sbt @@ -1,7 +1,7 @@ #!/usr/bin/env bash set +e -declare builtin_sbt_version="1.6.2" +declare builtin_sbt_version="1.7.1" declare -a residual_args declare -a java_args declare -a scalac_args @@ -24,7 +24,7 @@ declare build_props_sbt_version= declare use_sbtn= declare no_server= declare sbtn_command="$SBTN_CMD" -declare sbtn_version="1.4.7" +declare sbtn_version="1.7.0" ### ------------------------------- ### ### Helper methods for BASH scripts ### diff --git a/sbt-app/src/sbt-test/actions/cross-multiproject/test b/sbt-app/src/sbt-test/actions/cross-multiproject/test index baf4db9b8..b464e9cb3 100644 --- a/sbt-app/src/sbt-test/actions/cross-multiproject/test +++ b/sbt-app/src/sbt-test/actions/cross-multiproject/test @@ -52,7 +52,7 @@ $ exists sbt-foo/target/scala-2.12 # test wildcard switching (2.13) > clean -> ++ 2.13.* -v compile +> ++ 2.13.x -v compile $ exists lib/target/scala-2.13 -$ exists lib/target/scala-2.12 # -$ exists sbt-foo/target/scala-2.12 diff --git a/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/build.sbt b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/build.sbt new file mode 100644 index 000000000..d5cf2f898 --- /dev/null +++ b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/build.sbt @@ -0,0 +1,14 @@ +scalaVersion := "2.12.16" + +lazy val core = project + .settings( + crossScalaVersions := Seq("2.12.16", "3.0.2", "3.1.2") + ) + +lazy val subproj = project + .dependsOn(core) + .settings( + crossScalaVersions := Seq("2.12.16", "3.1.2"), + // a random library compiled against Scala 3.1 + libraryDependencies += "org.http4s" %% "http4s-core" % "0.23.12" + ) diff --git a/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/subproj/src/main/scala/A.scala b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/subproj/src/main/scala/A.scala new file mode 100644 index 000000000..da95b9fc4 --- /dev/null +++ b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/subproj/src/main/scala/A.scala @@ -0,0 +1,6 @@ +import org.http4s.Uri + +object A { + // Just using something from http4s + Uri.fromString("example.com") +} diff --git a/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/test b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/test new file mode 100644 index 000000000..ea7afbf93 --- /dev/null +++ b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/test @@ -0,0 +1,14 @@ +> ++3.0.2 compile + +$ exists core/target/scala-3.0.2 +-$ exists core/target/scala-3.1.2 +-$ exists subproj/target/scala-3.0.2 +-$ exists subproj/target/scala-3.1.2 + +> clean +> ++3.1.2 compile + +-$ exists core/target/scala-3.0.2 +$ exists core/target/scala-3.1.2 +-$ exists subproj/target/scala-3.0.2 +$ exists subproj/target/scala-3.1.2 diff --git a/sbt-app/src/sbt-test/actions/cross-strict-aggregation/build.sbt b/sbt-app/src/sbt-test/actions/cross-strict-aggregation/build.sbt index b7cb3b5c2..1ffbc3b59 100644 --- a/sbt-app/src/sbt-test/actions/cross-strict-aggregation/build.sbt +++ b/sbt-app/src/sbt-test/actions/cross-strict-aggregation/build.sbt @@ -1,4 +1,4 @@ -lazy val scala212 = "2.12.12" +lazy val scala212 = "2.12.16" lazy val scala213 = "2.13.1" ThisBuild / scalaVersion := scala212 diff --git a/sbt-app/src/sbt-test/actions/cross-strict-aggregation/test b/sbt-app/src/sbt-test/actions/cross-strict-aggregation/test index 8767e4e22..996094f8e 100644 --- a/sbt-app/src/sbt-test/actions/cross-strict-aggregation/test +++ b/sbt-app/src/sbt-test/actions/cross-strict-aggregation/test @@ -1,5 +1,7 @@ -> ++2.12.0-magic +-> ++2.12.12 + > ++2.13.1 compile $ exists core/target/scala-2.13 diff --git a/sbt-app/src/sbt-test/actions/eval-is-safe-and-sound/disabled b/sbt-app/src/sbt-test/actions/eval-is-safe-and-sound/test similarity index 100% rename from sbt-app/src/sbt-test/actions/eval-is-safe-and-sound/disabled rename to sbt-app/src/sbt-test/actions/eval-is-safe-and-sound/test diff --git a/sbt-app/src/sbt-test/dependency-management/dynamic-revision/disabled b/sbt-app/src/sbt-test/dependency-management/dynamic-revision/test similarity index 100% rename from sbt-app/src/sbt-test/dependency-management/dynamic-revision/disabled rename to sbt-app/src/sbt-test/dependency-management/dynamic-revision/test diff --git a/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/build.sbt b/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/build.sbt index 8aabedac8..8da13c7ec 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "3.0.0-M1" +ThisBuild / scalaVersion := "3.1.3" lazy val plugin = project .in(file("plugin")) @@ -12,7 +12,7 @@ lazy val plugin = project ), libraryDependencies ++= Seq( - "ch.epfl.lamp" %% "dotty-compiler" % scalaVersion.value % "provided" + "org.scala-lang" %% "scala3-compiler" % scalaVersion.value % "provided" ) ) diff --git a/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/changes/build.sbt b/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/changes/build.sbt index 584adf234..3c716e1bb 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/changes/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/changes/build.sbt @@ -1,4 +1,4 @@ -lazy val dottyVersion = "3.0.0-M1" +lazy val dottyVersion = "3.1.3" lazy val plugin = project .in(file("plugin")) @@ -7,10 +7,6 @@ lazy val plugin = project version := "0.0.1", organization := "ch.epfl.lamp", scalaVersion := dottyVersion, - - libraryDependencies ++= Seq( - "ch.epfl.lamp" %% "dotty" % scalaVersion.value % "provided" - ) ) lazy val app = project diff --git a/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/project/plugins.sbt deleted file mode 100644 index 83a3da10f..000000000 --- a/sbt-app/src/sbt-test/plugins/dotty-compiler-plugin/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") diff --git a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt index 9e2883f48..f28325922 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt @@ -1,15 +1,15 @@ -ThisBuild / scalaVersion := "2.13.4" +ThisBuild / scalaVersion := "2.13.8" ThisBuild / scalacOptions += "-Ytasty-reader" lazy val scala3code = project .enablePlugins(ScalaJSPlugin) - .settings(scalaVersion := "3.0.0-M1") + .settings(scalaVersion := "3.1.3") lazy val app = project .enablePlugins(ScalaJSPlugin) .dependsOn(scala3code) .settings( libraryDependencies ~= (_.filterNot(_.name.contains("scalajs-compiler"))), - addCompilerPlugin("org.scala-js" % "scalajs-compiler_2.13.4" % scalaJSVersion), + addCompilerPlugin("org.scala-js" % "scalajs-compiler_2.13.8" % scalaJSVersion), scalaJSUseMainModuleInitializer := true, ) diff --git a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt index f0dfae12d..4c620dc0a 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt @@ -1,2 +1 @@ -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1") diff --git a/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt b/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt index d6b4a9a34..fe7f9dd1f 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt @@ -1,7 +1,7 @@ -ThisBuild / scalaVersion := "3.0.0-M1" +ThisBuild / scalaVersion := "3.1.3" ThisBuild / scalacOptions += "-Ytasty-reader" -lazy val scala213 = "2.13.4" +lazy val scala213 = "2.13.8" lazy val root = (project in file(".")) .aggregate(fooApp, fooCore, barApp, barCore) diff --git a/sbt-app/src/sbt-test/plugins/dotty-sandwich/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/dotty-sandwich/project/plugins.sbt deleted file mode 100644 index 83a3da10f..000000000 --- a/sbt-app/src/sbt-test/plugins/dotty-sandwich/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") diff --git a/sbt-app/src/sbt-test/plugins/dotty/build.sbt b/sbt-app/src/sbt-test/plugins/dotty/build.sbt index e80bfb07c..e46913668 100644 --- a/sbt-app/src/sbt-test/plugins/dotty/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty/build.sbt @@ -1 +1 @@ -ThisBuild / scalaVersion := "3.0.0-M1" +ThisBuild / scalaVersion := "3.1.3" diff --git a/sbt-app/src/sbt-test/plugins/dotty/project/build.properties b/sbt-app/src/sbt-test/plugins/dotty/project/build.properties deleted file mode 100644 index 16dc090c5..000000000 --- a/sbt-app/src/sbt-test/plugins/dotty/project/build.properties +++ /dev/null @@ -1,3 +0,0 @@ -# sbt-coursier scripted tests: required, as we default to sbt 1.0.3, -# but sbt-dotty requires sbt >= 1.2.7 -sbt.version=1.2.7 diff --git a/sbt-app/src/sbt-test/plugins/dotty/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/dotty/project/plugins.sbt deleted file mode 100644 index 83a3da10f..000000000 --- a/sbt-app/src/sbt-test/plugins/dotty/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") diff --git a/sbt-app/src/sbt-test/project/source-plugins/build.sbt b/sbt-app/src/sbt-test/project/source-plugins/build.sbt index 0b5906837..c9d463090 100644 --- a/sbt-app/src/sbt-test/project/source-plugins/build.sbt +++ b/sbt-app/src/sbt-test/project/source-plugins/build.sbt @@ -2,6 +2,6 @@ name := "source-plugins" organization := "org.example" -proguardSettings +enablePlugins(SbtProguard) useJGit diff --git a/sbt-app/src/sbt-test/project/source-plugins/project/plugin.sbt b/sbt-app/src/sbt-test/project/source-plugins/project/plugin.sbt index 381215651..e5a6a1f84 100644 --- a/sbt-app/src/sbt-test/project/source-plugins/project/plugin.sbt +++ b/sbt-app/src/sbt-test/project/source-plugins/project/plugin.sbt @@ -1,5 +1,5 @@ -lazy val proguard = uri("git://github.com/sbt/sbt-proguard.git#e7b4732969c137db1b5") -lazy val git = uri("git://github.com/sbt/sbt-git.git#2e7c2503850698d60bb") +lazy val proguard = RootProject(uri("https://github.com/sbt/sbt-proguard.git#95b27788a5b00ab89e8ae7c05ef5bfe538129280")) +lazy val git = RootProject(uri("https://github.com/sbt/sbt-git.git#a81a110af1c5693cd3fd0204248f5c529a43a112")) lazy val root = (project in file(".")). dependsOn(proguard, git) diff --git a/sbt-app/src/sbt-test/project/source-plugins/project/plugins.sbt b/sbt-app/src/sbt-test/project/source-plugins/project/plugins.sbt deleted file mode 100644 index 6dc6ae42e..000000000 --- a/sbt-app/src/sbt-test/project/source-plugins/project/plugins.sbt +++ /dev/null @@ -1,7 +0,0 @@ -lazy val plugins = (project in file(".")) - .dependsOn(proguard, git) - -// e7b4732969c137db1b5 -// d4974f7362bf55d3f52 -lazy val proguard = uri("git://github.com/sbt/sbt-proguard.git#e7b4732969c137db1b5") -lazy val git = uri("git://github.com/sbt/sbt-git.git#2e7c2503850698d60bb") diff --git a/sbt-app/src/sbt-test/project/source-plugins/pending b/sbt-app/src/sbt-test/project/source-plugins/test similarity index 100% rename from sbt-app/src/sbt-test/project/source-plugins/pending rename to sbt-app/src/sbt-test/project/source-plugins/test diff --git a/sbt-app/src/sbt-test/source-dependencies/repeated-parameters/disabled b/sbt-app/src/sbt-test/source-dependencies/repeated-parameters/test similarity index 100% rename from sbt-app/src/sbt-test/source-dependencies/repeated-parameters/disabled rename to sbt-app/src/sbt-test/source-dependencies/repeated-parameters/test diff --git a/sbt-app/src/sbt-test/tests/fork-test-group-parallel/disabled b/sbt-app/src/sbt-test/tests/fork-test-group-parallel/test similarity index 100% rename from sbt-app/src/sbt-test/tests/fork-test-group-parallel/disabled rename to sbt-app/src/sbt-test/tests/fork-test-group-parallel/test diff --git a/sbt-app/src/sbt-test/tests/t543/disabled b/sbt-app/src/sbt-test/tests/t543/test similarity index 100% rename from sbt-app/src/sbt-test/tests/t543/disabled rename to sbt-app/src/sbt-test/tests/t543/test