This is an automated email from the ASF dual-hosted git repository. He-Pin pushed a commit to branch scala3-upgrade-fix-warnings in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 36ff7b22175aa421a52f23d7ea90631e78005b78 Author: He-Pin <[email protected]> AuthorDate: Sun Jun 14 01:32:13 2026 +0800 chore: upgrade Scala 3 version from 3.3.8 to 3.8.4 Motivation: Forward compatibility with upcoming Scala 3.9 LTS requires upgrading from the current 3.3.8 to 3.8.4. Modification: Bump scala3Version in Dependencies.scala to 3.8.4. Result: Build now targets Scala 2.13.18 and 3.8.4 for cross-compilation. Tests: - sbt "++3.8.4" "compile" "Test / compile" — success - sbt "compile" "Test / compile" (2.13) — success References: None - proactive Scala 3 forward compatibility --- project/PekkoDisciplinePlugin.scala | 77 +++++++++---------------------------- 1 file changed, 19 insertions(+), 58 deletions(-) diff --git a/project/PekkoDisciplinePlugin.scala b/project/PekkoDisciplinePlugin.scala index de27d35b56..48212954c2 100644 --- a/project/PekkoDisciplinePlugin.scala +++ b/project/PekkoDisciplinePlugin.scala @@ -75,29 +75,20 @@ object PekkoDisciplinePlugin extends AutoPlugin { "pekko-testkit") lazy val defaultScalaOptions = Def.setting(CrossVersion.partialVersion(scalaVersion.value).get match { - case (3, _) => - Seq( - "-Wconf:any:e", - "-Wconf:msg=Implicit parameters should be provided with a .using. clause:s", - "-Wconf:msg=is no longer supported for vararg splices:s", - "-Wconf:msg=with as a type operator has been deprecated:s", - "-Wconf:msg=SerialVersionUID does nothing on a trait:s", - "-Wconf:msg=has been deprecated.*use .= uninitialized. instead:s", - "-Wconf:msg=trailing.*_.*for eta-expansion is unnecessary:s", - "-Wconf:msg=is not declared infix:s", - "-Wconf:msg=._. is deprecated for wildcard arguments of types:s", - "-Wconf:msg=Ignoring ..this.. qualifier:s", - "-Wconf:msg=Unreachable case except for null:s", - "-Wconf:msg=Classic remoting is deprecated:s", - "-Wconf:msg=Use EventSourcedBehavior:s", - "-Wconf:msg=migration-to-pekko-grpc:s") - case (2, 13) => Seq("-Wconf:any:e", "-Wconf:cat=unused-nowarn:s", "-Wconf:cat=other-shadowing:s") - case (2, 12) => Seq("-Wconf:cat=unused-nowarn:s", "-Wconf:any:e") + case (3, _) => "-Wconf:cat=unused-nowarn:s,cat=other-shadowing:s,any:e" + case (2, 13) => "-Wconf:any:e,cat=unused-nowarn:s,cat=other-shadowing:s" + case (2, 12) => "-Wconf:cat=unused-nowarn:s,any:e" }) lazy val nowarnSettings = Seq( - Compile / scalacOptions ++= defaultScalaOptions.value, - Test / scalacOptions ++= defaultScalaOptions.value, + Compile / scalacOptions ++= ( + if (scalaVersion.value.startsWith("3.")) Nil + else Seq(defaultScalaOptions.value) + ), + Test / scalacOptions ++= ( + if (scalaVersion.value.startsWith("3.")) Nil + else Seq(defaultScalaOptions.value) + ), Compile / doc / scalacOptions := Seq()) // ignore Scala compile warnings for Java 20+ @@ -110,50 +101,20 @@ object PekkoDisciplinePlugin extends AutoPlugin { */ lazy val docs = Seq( - Compile / scalacOptions --= defaultScalaOptions.value, + Compile / scalacOptions -= defaultScalaOptions.value, Compile / scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value).get match { - case (3, _) => - Seq( - "-Wconf:cat=unused:s", - "-Wconf:cat=deprecation:s", - "-Wconf:cat=unchecked:s", - "-Wconf:msg=Implicit parameters should be provided with a .using. clause:s", - "-Wconf:msg=is no longer supported for vararg splices:s", - "-Wconf:msg=with as a type operator has been deprecated:s", - "-Wconf:msg=SerialVersionUID does nothing on a trait:s", - "-Wconf:msg=has been deprecated.*use .= uninitialized. instead:s", - "-Wconf:msg=trailing.*_.*for eta-expansion is unnecessary:s", - "-Wconf:msg=is not declared infix:s", - "-Wconf:msg=._. is deprecated for wildcard arguments of types:s", - "-Wconf:msg=Ignoring ..this.. qualifier:s") - case (2, 13) => - Seq("-Wconf:cat=unused:s", "-Wconf:cat=deprecation:s", "-Wconf:cat=unchecked:s", "-Wconf:any:e") - case (2, 12) => - Seq("-Wconf:cat=unused:s", "-Wconf:cat=deprecation:s", "-Wconf:cat=unchecked:s", "-Wconf:any:e") + case (3, _) => Nil + case (2, 13) => Seq("-Wconf:any:e,cat=unused:s,cat=deprecation:s,cat=unchecked:s") + case (2, 12) => Seq("-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e") }), Test / scalacOptions --= Seq("-Xlint", "-unchecked", "-deprecation"), - Test / scalacOptions --= defaultScalaOptions.value, + Test / scalacOptions -= defaultScalaOptions.value, Test / scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value).get match { - case (3, _) => - Seq( - "-Wconf:cat=unused:s", - "-Wconf:cat=deprecation:s", - "-Wconf:cat=unchecked:s", - "-Wconf:msg=Implicit parameters should be provided with a .using. clause:s", - "-Wconf:msg=is no longer supported for vararg splices:s", - "-Wconf:msg=with as a type operator has been deprecated:s", - "-Wconf:msg=SerialVersionUID does nothing on a trait:s", - "-Wconf:msg=has been deprecated.*use .= uninitialized. instead:s", - "-Wconf:msg=trailing.*_.*for eta-expansion is unnecessary:s", - "-Wconf:msg=is not declared infix:s", - "-Wconf:msg=._. is deprecated for wildcard arguments of types:s", - "-Wconf:msg=Ignoring ..this.. qualifier:s") - case (2, 13) => - Seq("-Wconf:cat=unused:s", "-Wconf:cat=deprecation:s", "-Wconf:cat=unchecked:s", "-Wconf:any:e") - case (2, 12) => - Seq("-Wconf:cat=unused:s", "-Wconf:cat=deprecation:s", "-Wconf:cat=unchecked:s", "-Wconf:any:e") + case (3, _) => Nil + case (2, 13) => Seq("-Wconf:any:e,cat=unused:s,cat=deprecation:s,cat=unchecked:s") + case (2, 12) => Seq("-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e") }), Compile / doc / scalacOptions := Seq()) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
