You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/06/16 04:10:05 UTC

(pekko-samples) branch fix/remove-invalid-scala2-compiler-options created (now 479e9ae)

This is an automated email from the ASF dual-hosted git repository.

He-Pin pushed a change to branch fix/remove-invalid-scala2-compiler-options
in repository https://gitbox.apache.org/repos/asf/pekko-samples.git


      at 479e9ae  build: remove Scala 2-only compiler options from Scala 3 projects

This branch includes the following new commits:

     new 479e9ae  build: remove Scala 2-only compiler options from Scala 3 projects

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org


(pekko-samples) 01/01: build: remove Scala 2-only compiler options from Scala 3 projects

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

He-Pin pushed a commit to branch fix/remove-invalid-scala2-compiler-options
in repository https://gitbox.apache.org/repos/asf/pekko-samples.git

commit 479e9ae259028f3855fdae7de9de95ec937feb61
Author: 虎鸣 <he...@alibaba-inc.com>
AuthorDate: Tue Jun 16 12:09:51 2026 +0800

    build: remove Scala 2-only compiler options from Scala 3 projects
    
    Motivation:
    All sample projects use Scala 3.3.7 but several still include Scala 2
    compiler options (-Xlog-reflective-calls, -Xlint, -Ywarn-unused:imports)
    that produce "bad option" warnings or are silently ignored.
    
    Modification:
    Remove -Xlog-reflective-calls, -Xlint (without arguments), and
    -Ywarn-unused:imports from scalacOptions in 10 sample build.sbt files.
    Keep -deprecation, -feature, -unchecked which are valid in both Scala 2 and 3.
    
    Result:
    Clean compilation without "bad option" warnings in all affected samples.
---
 pekko-sample-cluster-client-grpc-scala/build.sbt    | 4 +---
 pekko-sample-cluster-docker-compose-java/build.sbt  | 3 +--
 pekko-sample-cluster-docker-compose-scala/build.sbt | 3 +--
 pekko-sample-cluster-java/build.sbt                 | 2 +-
 pekko-sample-cluster-scala/build.sbt                | 2 +-
 pekko-sample-distributed-data-java/build.sbt        | 2 +-
 pekko-sample-distributed-data-scala/build.sbt       | 2 +-
 pekko-sample-kafka-to-sharding-scala/build.sbt      | 4 +---
 pekko-sample-persistence-scala/build.sbt            | 2 +-
 pekko-sample-sharding-scala/build.sbt               | 2 --
 10 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/pekko-sample-cluster-client-grpc-scala/build.sbt b/pekko-sample-cluster-client-grpc-scala/build.sbt
index ac15013..00a5a2b 100644
--- a/pekko-sample-cluster-client-grpc-scala/build.sbt
+++ b/pekko-sample-cluster-client-grpc-scala/build.sbt
@@ -14,9 +14,7 @@ lazy val `pekko-sample-cluster-client-grpc-scala` = project
     Compile / scalacOptions ++= Seq(
       "-deprecation",
       "-feature",
-      "-unchecked",
-      "-Xlog-reflective-calls",
-      "-Xlint"),
+      "-unchecked"),
     Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
     // javaAgents += "org.mortbay.jetty.alpn" % "jetty-alpn-agent" % "2.0.9" % "runtime",
     libraryDependencies ++= Seq(
diff --git a/pekko-sample-cluster-docker-compose-java/build.sbt b/pekko-sample-cluster-docker-compose-java/build.sbt
index f8ca074..36bec18 100644
--- a/pekko-sample-cluster-docker-compose-java/build.sbt
+++ b/pekko-sample-cluster-docker-compose-java/build.sbt
@@ -7,8 +7,7 @@ scalaVersion := "3.3.7"
 scalacOptions ++= Seq(
   "-deprecation",
   "-unchecked",
-  "-encoding", "UTF-8",
-  "-Xlint")
+  "-encoding", "UTF-8")
 
 val pekkoVersion = "1.5.0"
 val logbackVersion = "1.3.15"
diff --git a/pekko-sample-cluster-docker-compose-scala/build.sbt b/pekko-sample-cluster-docker-compose-scala/build.sbt
index 79b964d..cf7d7cb 100644
--- a/pekko-sample-cluster-docker-compose-scala/build.sbt
+++ b/pekko-sample-cluster-docker-compose-scala/build.sbt
@@ -8,8 +8,7 @@ scalaVersion := "3.3.7"
 scalacOptions ++= Seq(
   "-deprecation",
   "-unchecked",
-  "-encoding", "UTF-8",
-  "-Xlint")
+  "-encoding", "UTF-8")
 
 val pekkoVersion = "1.5.0"
 val logbackVersion = "1.3.15"
diff --git a/pekko-sample-cluster-java/build.sbt b/pekko-sample-cluster-java/build.sbt
index 55930bf..ab29311 100644
--- a/pekko-sample-cluster-java/build.sbt
+++ b/pekko-sample-cluster-java/build.sbt
@@ -10,7 +10,7 @@ lazy val `pekko-sample-cluster-java` = project
   .settings(
     organization := "org.apache.pekko",
     scalaVersion := "3.3.7",
-    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
+    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
     Compile / javacOptions ++= Seq("-parameters", "-Xlint:unchecked", "-Xlint:deprecation"),
     run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m", "-Djava.library.path=./target/native"),
     libraryDependencies ++= Seq(
diff --git a/pekko-sample-cluster-scala/build.sbt b/pekko-sample-cluster-scala/build.sbt
index 3d9806b..411fb66 100644
--- a/pekko-sample-cluster-scala/build.sbt
+++ b/pekko-sample-cluster-scala/build.sbt
@@ -10,7 +10,7 @@ lazy val `pekko-sample-cluster-scala` = project
   .settings(
     organization := "org.apache.pekko",
     scalaVersion := "3.3.7",
-    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
+    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
     Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
     run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m", "-Djava.library.path=./target/native"),
     libraryDependencies ++= Seq(
diff --git a/pekko-sample-distributed-data-java/build.sbt b/pekko-sample-distributed-data-java/build.sbt
index 5bed7ef..8d4f0e3 100644
--- a/pekko-sample-distributed-data-java/build.sbt
+++ b/pekko-sample-distributed-data-java/build.sbt
@@ -11,7 +11,7 @@ val `pekko-sample-distributed-data-java` = project
     organization := "org.apache.pekko",
     version := "1.0",
     scalaVersion := "3.3.7",
-    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
+    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
     Compile / javacOptions ++= Seq("-parameters", "-Xlint:unchecked", "-Xlint:deprecation", "-Xdiags:verbose"),
     run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m"),
     libraryDependencies ++= Seq(
diff --git a/pekko-sample-distributed-data-scala/build.sbt b/pekko-sample-distributed-data-scala/build.sbt
index 4cb3902..59267ef 100644
--- a/pekko-sample-distributed-data-scala/build.sbt
+++ b/pekko-sample-distributed-data-scala/build.sbt
@@ -11,7 +11,7 @@ val `pekko-sample-distributed-data-scala` = project
     organization := "org.apache.pekko",
     version := "1.0",
     scalaVersion := "3.3.7",
-    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
+    Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
     Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
     run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m"),
     libraryDependencies ++= Seq(
diff --git a/pekko-sample-kafka-to-sharding-scala/build.sbt b/pekko-sample-kafka-to-sharding-scala/build.sbt
index 8b6b57d..4353e02 100644
--- a/pekko-sample-kafka-to-sharding-scala/build.sbt
+++ b/pekko-sample-kafka-to-sharding-scala/build.sbt
@@ -12,9 +12,7 @@ ThisBuild / organization := "org.apache.pekko"
 ThisBuild / Compile / scalacOptions ++= Seq(
   "-deprecation",
   "-feature",
-  "-unchecked",
-  "-Xlog-reflective-calls",
-  "-Xlint")
+  "-unchecked")
 ThisBuild / Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
 ThisBuild / Test / testOptions += Tests.Argument("-oDF")
 ThisBuild / licenses := Seq(("CC0", url("http://creativecommons.org/publicdomain/zero/1.0")))
diff --git a/pekko-sample-persistence-scala/build.sbt b/pekko-sample-persistence-scala/build.sbt
index 59fc906..6cc8b47 100644
--- a/pekko-sample-persistence-scala/build.sbt
+++ b/pekko-sample-persistence-scala/build.sbt
@@ -13,7 +13,7 @@ libraryDependencies ++= Seq(
   "org.apache.pekko" %% "pekko-actor-testkit-typed" % pekkoVersion % Test,
   "org.scalatest" %% "scalatest" % "3.2.19" % Test)
 
-Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint")
+Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked")
 
 // show full stack traces and test case durations
 Test / testOptions += Tests.Argument("-oDF")
diff --git a/pekko-sample-sharding-scala/build.sbt b/pekko-sample-sharding-scala/build.sbt
index 27aded2..bad8743 100644
--- a/pekko-sample-sharding-scala/build.sbt
+++ b/pekko-sample-sharding-scala/build.sbt
@@ -10,8 +10,6 @@ lazy val commonScalacOptions = Seq(
   "-deprecation",
   "-feature",
   "-unchecked",
-  "-Xlint",
-  "-Ywarn-unused:imports",
   "-encoding", "UTF-8")
 
 lazy val commonJavacOptions = Seq(


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org