From 9e7a624453475771d7f2ade1e86a5fd8494982ad Mon Sep 17 00:00:00 2001 From: "scala-center-steward[bot]" <111975575+scala-center-steward[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 00:16:11 +0000 Subject: [PATCH 1/3] build(deps): Update zinc from 1.9.2 to 1.9.3 --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index b4c3f65c4b..829d947a87 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -16,7 +16,7 @@ object Dependencies { val nailgunCommit = "a2520c1e" // Keep in sync in BloopComponentCompiler - val zincVersion = "1.9.2" + val zincVersion = "1.9.3" val bspVersion = "2.1.0-M5" From cda325608ef7e7309c58adc5c91d45ec628f171d Mon Sep 17 00:00:00 2001 From: tgodzik Date: Wed, 26 Jul 2023 20:31:39 +0200 Subject: [PATCH 2/3] bugfix: Switch to AnalysisCallback2 --- .../internal/BloopAnalysisCallback.scala | 36 +++++++++++++-- .../internal/ConcurrentAnalysisCallback.scala | 44 +++++++++++++++++-- 2 files changed, 73 insertions(+), 7 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 c6a57bf8e1..0fd6909d3a 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 @@ -35,8 +35,11 @@ import xsbti.compile.ClassFileManager import xsbti.compile.IncOptions import xsbti.compile.Output import xsbti.compile.analysis.ReadStamps +import xsbti.{Action, DiagnosticCode, DiagnosticRelatedInformation} -trait IBloopAnalysisCallback extends xsbti.AnalysisCallback { +import collection.JavaConverters._ + +trait IBloopAnalysisCallback extends xsbti.AnalysisCallback2 { def get: Analysis } @@ -115,21 +118,46 @@ final class BloopAnalysisCallback( startSource(converter.toVirtualFile(source.toPath())) } - def problem( + def problem2( category: String, pos: Position, msg: String, severity: Severity, - reported: Boolean + reported: Boolean, + rendered: ju.Optional[String], + diagnosticCode: ju.Optional[DiagnosticCode], + diagnosticRelatedInformation: ju.List[DiagnosticRelatedInformation], + actions: ju.List[Action] ): Unit = { for (source <- InterfaceUtil.jo2o(pos.sourceFile)) { val map = if (reported) reportedProblems else unreportedProblems map .getOrElseUpdate(source.toPath(), new mutable.ListBuffer()) - .+=(InterfaceUtil.problem(category, pos, msg, severity, None, None, Nil)) + .+=( + InterfaceUtil.problem( + category, + pos, + msg, + severity, + None, + InterfaceUtil.toOption(diagnosticCode), + diagnosticRelatedInformation.asScala.toList, + actions.asScala.toList + ) + ) } } + def problem( + category: String, + pos: Position, + msg: String, + severity: Severity, + reported: Boolean + ): Unit = { + problem(category, pos, msg, severity, reported) + } + def classDependency( onClassName: String, sourceClassName: String, 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 5cbb61b7e4..af98b499e8 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 @@ -35,6 +35,9 @@ import xsbti.compile.ClassFileManager import xsbti.compile.IncOptions import xsbti.compile.Output import xsbti.compile.analysis.ReadStamps +import xsbti.{Action, DiagnosticCode, DiagnosticRelatedInformation} + +import collection.JavaConverters._ /** * This class provides a thread-safe implementation of `xsbti.AnalysisCallback` which is required to compile with the @@ -123,21 +126,56 @@ final class ConcurrentAnalysisCallback( startSource(converter.toVirtualFile(source.toPath())) } - def problem( + def problem2( category: String, pos: Position, msg: String, severity: Severity, - reported: Boolean + reported: Boolean, + rendered: ju.Optional[String], + diagnosticCode: ju.Optional[DiagnosticCode], + diagnosticRelatedInformation: ju.List[DiagnosticRelatedInformation], + actions: ju.List[Action] ): Unit = { for (source <- InterfaceUtil.jo2o(pos.sourceFile)) { val map = if (reported) reportedProblems else unreportedProblems map .getOrElseUpdate(source.toPath(), new ConcurrentLinkedQueue) - .add(InterfaceUtil.problem(category, pos, msg, severity, None, None, Nil)) + .add( + InterfaceUtil.problem( + category, + pos, + msg, + severity, + None, + InterfaceUtil.toOption(diagnosticCode), + diagnosticRelatedInformation.asScala.toList, + actions.asScala.toList + ) + ) } } + def problem( + category: String, + pos: Position, + msg: String, + severity: Severity, + reported: Boolean + ): Unit = { + problem2( + category, + pos, + msg, + severity, + reported, + rendered = ju.Optional.empty(), + diagnosticCode = ju.Optional.empty(), + diagnosticRelatedInformation = Nil.asJava, + actions = Nil.asJava + ) + } + def classDependency( onClassName: String, sourceClassName: String, From f0fac2df3f8cebd076eda5e73ba0820412859f6d Mon Sep 17 00:00:00 2001 From: tgodzik Date: Wed, 26 Jul 2023 21:43:10 +0200 Subject: [PATCH 3/3] chore: Also bump sbt to 1.9.3 --- .../compiler-plugin-allowlist/project/build.properties | 2 +- .../cross-test-build-scala-native-0.4/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 +- .../test/resources/scala-seed-project/project/build.properties | 2 +- .../src/test/resources/simple-build/project/build.properties | 2 +- project/Dependencies.scala | 2 +- project/build.properties | 2 +- 11 files changed, 11 insertions(+), 11 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 7a2f2cd1bd..91550e8201 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.9.2 +sbt.version=1.9.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 7a2f2cd1bd..91550e8201 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.9.2 +sbt.version=1.9.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 875b706a8e..52413ab79a 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.9.2 +sbt.version=1.9.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 875b706a8e..52413ab79a 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.9.2 +sbt.version=1.9.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 875b706a8e..52413ab79a 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.9.2 +sbt.version=1.9.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 875b706a8e..52413ab79a 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.9.2 +sbt.version=1.9.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 875b706a8e..52413ab79a 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.9.2 +sbt.version=1.9.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 875b706a8e..52413ab79a 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.9.2 +sbt.version=1.9.3 diff --git a/frontend/src/test/resources/simple-build/project/build.properties b/frontend/src/test/resources/simple-build/project/build.properties index 875b706a8e..52413ab79a 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.9.2 +sbt.version=1.9.3 diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 829d947a87..0ab1e531d0 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -26,7 +26,7 @@ object Dependencies { val caseAppVersion = "2.0.6" val sourcecodeVersion = "0.3.0" val sbtTestInterfaceVersion = "1.0" - val sbtTestAgentVersion = "1.9.2" + val sbtTestAgentVersion = "1.9.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 875b706a8e..52413ab79a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.2 +sbt.version=1.9.3