Skip to content

Commit 4e78630

Browse files
committed
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.
1 parent 3fb7983 commit 4e78630

10 files changed

Lines changed: 9 additions & 17 deletions

File tree

pekko-sample-cluster-client-grpc-scala/build.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ lazy val `pekko-sample-cluster-client-grpc-scala` = project
1414
Compile / scalacOptions ++= Seq(
1515
"-deprecation",
1616
"-feature",
17-
"-unchecked",
18-
"-Xlog-reflective-calls",
19-
"-Xlint"),
17+
"-unchecked"),
2018
Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
2119
// javaAgents += "org.mortbay.jetty.alpn" % "jetty-alpn-agent" % "2.0.9" % "runtime",
2220
libraryDependencies ++= Seq(

pekko-sample-cluster-docker-compose-java/build.sbt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ scalaVersion := "3.3.7"
77
scalacOptions ++= Seq(
88
"-deprecation",
99
"-unchecked",
10-
"-encoding", "UTF-8",
11-
"-Xlint")
10+
"-encoding", "UTF-8")
1211

1312
val pekkoVersion = "1.5.0"
1413
val logbackVersion = "1.3.15"

pekko-sample-cluster-docker-compose-scala/build.sbt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ scalaVersion := "3.3.7"
88
scalacOptions ++= Seq(
99
"-deprecation",
1010
"-unchecked",
11-
"-encoding", "UTF-8",
12-
"-Xlint")
11+
"-encoding", "UTF-8")
1312

1413
val pekkoVersion = "1.5.0"
1514
val logbackVersion = "1.3.15"

pekko-sample-cluster-java/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ lazy val `pekko-sample-cluster-java` = project
1010
.settings(
1111
organization := "org.apache.pekko",
1212
scalaVersion := "3.3.7",
13-
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
13+
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
1414
Compile / javacOptions ++= Seq("-parameters", "-Xlint:unchecked", "-Xlint:deprecation"),
1515
run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m", "-Djava.library.path=./target/native"),
1616
libraryDependencies ++= Seq(

pekko-sample-cluster-scala/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ lazy val `pekko-sample-cluster-scala` = project
1010
.settings(
1111
organization := "org.apache.pekko",
1212
scalaVersion := "3.3.7",
13-
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
13+
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
1414
Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
1515
run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m", "-Djava.library.path=./target/native"),
1616
libraryDependencies ++= Seq(

pekko-sample-distributed-data-java/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ val `pekko-sample-distributed-data-java` = project
1111
organization := "org.apache.pekko",
1212
version := "1.0",
1313
scalaVersion := "3.3.7",
14-
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
14+
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
1515
Compile / javacOptions ++= Seq("-parameters", "-Xlint:unchecked", "-Xlint:deprecation", "-Xdiags:verbose"),
1616
run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m"),
1717
libraryDependencies ++= Seq(

pekko-sample-distributed-data-scala/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ val `pekko-sample-distributed-data-scala` = project
1111
organization := "org.apache.pekko",
1212
version := "1.0",
1313
scalaVersion := "3.3.7",
14-
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
14+
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
1515
Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
1616
run / javaOptions ++= Seq("-Xms128m", "-Xmx1024m"),
1717
libraryDependencies ++= Seq(

pekko-sample-kafka-to-sharding-scala/build.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ ThisBuild / organization := "org.apache.pekko"
1212
ThisBuild / Compile / scalacOptions ++= Seq(
1313
"-deprecation",
1414
"-feature",
15-
"-unchecked",
16-
"-Xlog-reflective-calls",
17-
"-Xlint")
15+
"-unchecked")
1816
ThisBuild / Compile / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
1917
ThisBuild / Test / testOptions += Tests.Argument("-oDF")
2018
ThisBuild / licenses := Seq(("CC0", url("http://creativecommons.org/publicdomain/zero/1.0")))

pekko-sample-persistence-scala/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ libraryDependencies ++= Seq(
1313
"org.apache.pekko" %% "pekko-actor-testkit-typed" % pekkoVersion % Test,
1414
"org.scalatest" %% "scalatest" % "3.2.19" % Test)
1515

16-
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint")
16+
Compile / scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked")
1717

1818
// show full stack traces and test case durations
1919
Test / testOptions += Tests.Argument("-oDF")

pekko-sample-sharding-scala/build.sbt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ lazy val commonScalacOptions = Seq(
1010
"-deprecation",
1111
"-feature",
1212
"-unchecked",
13-
"-Xlint",
14-
"-Ywarn-unused:imports",
1513
"-encoding", "UTF-8")
1614

1715
lazy val commonJavacOptions = Seq(

0 commit comments

Comments
 (0)