From 6e614d499601beeaa53f9d0e6e4498899d533739 Mon Sep 17 00:00:00 2001 From: "scala-center-steward[bot]" <111975575+scala-center-steward[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 00:21:20 +0000 Subject: [PATCH 1/2] build(deps): Update sbt, test-agent, zinc from 1.10.2 to 1.10.3 --- .../compiler-plugin-allowlist/project/build.properties | 2 +- .../project/build.properties | 2 +- .../project/build.properties | 2 +- .../cross-test-build-scalajs-0.6/project/build.properties | 2 +- .../cross-test-build-scalajs-1.0/project/build.properties | 2 +- .../cross-test-build-scalajs-1.x/project/build.properties | 2 +- .../resources/custom-test-framework/project/build.properties | 2 +- .../no-test-frameworks/project/project/build.properties | 2 +- .../resources/scala-seed-project/project/build.properties | 2 +- .../src/test/resources/simple-build/project/build.properties | 2 +- project/Dependencies.scala | 4 ++-- project/build.properties | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/frontend/src/test/resources/compiler-plugin-allowlist/project/build.properties b/frontend/src/test/resources/compiler-plugin-allowlist/project/build.properties index a1ff42a65..647551c8f 100644 --- a/frontend/src/test/resources/compiler-plugin-allowlist/project/build.properties +++ b/frontend/src/test/resources/compiler-plugin-allowlist/project/build.properties @@ -1,2 +1,2 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/cross-test-build-scala-native-0.4/project/build.properties b/frontend/src/test/resources/cross-test-build-scala-native-0.4/project/build.properties index a1ff42a65..647551c8f 100644 --- a/frontend/src/test/resources/cross-test-build-scala-native-0.4/project/build.properties +++ b/frontend/src/test/resources/cross-test-build-scala-native-0.4/project/build.properties @@ -1,2 +1,2 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/cross-test-build-scala-native-0.5/project/build.properties b/frontend/src/test/resources/cross-test-build-scala-native-0.5/project/build.properties index a1ff42a65..647551c8f 100644 --- a/frontend/src/test/resources/cross-test-build-scala-native-0.5/project/build.properties +++ b/frontend/src/test/resources/cross-test-build-scala-native-0.5/project/build.properties @@ -1,2 +1,2 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/cross-test-build-scalajs-0.6/project/build.properties b/frontend/src/test/resources/cross-test-build-scalajs-0.6/project/build.properties index 0b699c305..bc7390601 100644 --- a/frontend/src/test/resources/cross-test-build-scalajs-0.6/project/build.properties +++ b/frontend/src/test/resources/cross-test-build-scalajs-0.6/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/cross-test-build-scalajs-1.0/project/build.properties b/frontend/src/test/resources/cross-test-build-scalajs-1.0/project/build.properties index 0b699c305..bc7390601 100644 --- a/frontend/src/test/resources/cross-test-build-scalajs-1.0/project/build.properties +++ b/frontend/src/test/resources/cross-test-build-scalajs-1.0/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/cross-test-build-scalajs-1.x/project/build.properties b/frontend/src/test/resources/cross-test-build-scalajs-1.x/project/build.properties index 0b699c305..bc7390601 100644 --- a/frontend/src/test/resources/cross-test-build-scalajs-1.x/project/build.properties +++ b/frontend/src/test/resources/cross-test-build-scalajs-1.x/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/custom-test-framework/project/build.properties b/frontend/src/test/resources/custom-test-framework/project/build.properties index 0b699c305..bc7390601 100644 --- a/frontend/src/test/resources/custom-test-framework/project/build.properties +++ b/frontend/src/test/resources/custom-test-framework/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/no-test-frameworks/project/project/build.properties b/frontend/src/test/resources/no-test-frameworks/project/project/build.properties index 0b699c305..bc7390601 100644 --- a/frontend/src/test/resources/no-test-frameworks/project/project/build.properties +++ b/frontend/src/test/resources/no-test-frameworks/project/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/scala-seed-project/project/build.properties b/frontend/src/test/resources/scala-seed-project/project/build.properties index 0b699c305..bc7390601 100644 --- a/frontend/src/test/resources/scala-seed-project/project/build.properties +++ b/frontend/src/test/resources/scala-seed-project/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/frontend/src/test/resources/simple-build/project/build.properties b/frontend/src/test/resources/simple-build/project/build.properties index 0b699c305..bc7390601 100644 --- a/frontend/src/test/resources/simple-build/project/build.properties +++ b/frontend/src/test/resources/simple-build/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 3d743335b..ce716a7c2 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -12,7 +12,7 @@ object Dependencies { val SbtVersion = "1.5.8" // Keep in sync in BloopComponentCompiler - val zincVersion = "1.10.2" + val zincVersion = "1.10.3" val bspVersion = "2.1.1" @@ -23,7 +23,7 @@ object Dependencies { val coursierVersion = "2.1.14" val sourcecodeVersion = "0.4.2" val sbtTestInterfaceVersion = "1.0" - val sbtTestAgentVersion = "1.10.2" + val sbtTestAgentVersion = "1.10.3" val junitVersion = "0.13.3" val directoryWatcherVersion = "0.8.0+6-f651bd93" val monixVersion = "3.2.0" diff --git a/project/build.properties b/project/build.properties index 0b699c305..bc7390601 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.3 From 4ac8098c2c6a81c3a4f3a6292c4c264639638295 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Mon, 21 Oct 2024 10:07:10 +0200 Subject: [PATCH 2/2] bugfix: Fix compilation after updating sbt --- .../inc/bloop/internal/BloopAnalysisCallback.scala | 11 ++++++++++- .../inc/bloop/internal/BloopHighLevelCompiler.scala | 4 ++-- .../bloop/internal/ConcurrentAnalysisCallback.scala | 9 +++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopAnalysisCallback.scala b/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopAnalysisCallback.scala index e68471799..f8e98f194 100644 --- a/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopAnalysisCallback.scala +++ b/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopAnalysisCallback.scala @@ -39,9 +39,10 @@ import xsbti.api.SafeLazyProxy import xsbti.compile.ClassFileManager import xsbti.compile.IncOptions import xsbti.compile.Output +import xsbti.compile.analysis.ReadSourceInfos import xsbti.compile.analysis.ReadStamps -trait IBloopAnalysisCallback extends xsbti.AnalysisCallback2 { +trait IBloopAnalysisCallback extends xsbti.AnalysisCallback3 { def get: Analysis } @@ -103,6 +104,14 @@ final class BloopAnalysisCallback( () } + override def toVirtualFile(path: Path): VirtualFile = { + converter.toVirtualFile(path) + } + + override def getSourceInfos(): ReadSourceInfos = { + get.readSourceInfos() + } + def startSource(source: VirtualFile): Unit = { val sourcePath = converter.toPath(source) if (options.strictMode()) { diff --git a/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopHighLevelCompiler.scala b/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopHighLevelCompiler.scala index 33b6549f5..3718c9670 100644 --- a/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopHighLevelCompiler.scala +++ b/backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopHighLevelCompiler.scala @@ -151,11 +151,11 @@ final class BloopHighLevelCompiler( case t: StackOverflowError => val msg = "Encountered a StackOverflowError coming from the compiler. You might need to restart your Bloop build server" logger.error(s"${msg}:\n${t.getStackTrace().mkString("\n")}") - throw new CompileFailed(new Array(0), msg, new Array(0), t) + throw new CompileFailed(new Array(0), msg, new Array(0), None, t) case t: NoClassDefFoundError => val msg = "Encountered a NoClassDefFoundError coming from the compiler. You might need to clean compile your workspace" logger.error(s"${msg}:\n${t.getStackTrace().mkString("\n")}") - throw new CompileFailed(new Array(0), msg, new Array(0), t) + throw new CompileFailed(new Array(0), msg, new Array(0), None, t) case NonFatal(t) => // If scala compilation happens, complete the java promise so that it doesn't block JavaCompleted.tryFailure(t) diff --git a/backend/src/main/scala/sbt/internal/inc/bloop/internal/ConcurrentAnalysisCallback.scala b/backend/src/main/scala/sbt/internal/inc/bloop/internal/ConcurrentAnalysisCallback.scala index 437dc6a09..a7fa09008 100644 --- a/backend/src/main/scala/sbt/internal/inc/bloop/internal/ConcurrentAnalysisCallback.scala +++ b/backend/src/main/scala/sbt/internal/inc/bloop/internal/ConcurrentAnalysisCallback.scala @@ -40,6 +40,7 @@ import xsbti.compile.ClassFileManager import xsbti.compile.IncOptions import xsbti.compile.Output import xsbti.compile.analysis.ReadStamps +import xsbti.compile.analysis.ReadSourceInfos /** * This class provides a thread-safe implementation of `xsbti.AnalysisCallback` which is required to compile with the @@ -112,6 +113,14 @@ final class ConcurrentAnalysisCallback( () } + override def toVirtualFile(path: Path): VirtualFile = { + converter.toVirtualFile(path) + } + + override def getSourceInfos(): ReadSourceInfos = { + get.readSourceInfos() + } + def startSource(source: VirtualFile): Unit = { val sourcePath = converter.toPath(source) if (options.strictMode()) {