Skip to content

build: remove Scala 2-only compiler options from Scala 3 projects#169

Merged
He-Pin merged 1 commit into
mainfrom
fix/remove-invalid-scala2-compiler-options
Jun 17, 2026
Merged

build: remove Scala 2-only compiler options from Scala 3 projects#169
He-Pin merged 1 commit into
mainfrom
fix/remove-invalid-scala2-compiler-options

Conversation

@He-Pin

@He-Pin He-Pin commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove -Xlog-reflective-calls, -Xlint (without arguments), and -Ywarn-unused:imports from 10 sample build.sbt files
  • All sample projects use Scala 3.3.7 but several still had Scala 2-only compiler options that produce "bad option" warnings
  • Keep -deprecation, -feature, -unchecked which are valid in both Scala 2 and 3

Test plan

  • sbt compile in pekko-sample-cluster-scala produces no "bad option" warnings
  • Only valid scalacOptions retained across all affected projects

Affected samples:

  • pekko-sample-cluster-scala
  • pekko-sample-cluster-java
  • pekko-sample-cluster-client-grpc-scala
  • pekko-sample-cluster-docker-compose-scala
  • pekko-sample-cluster-docker-compose-java
  • pekko-sample-distributed-data-java
  • pekko-sample-distributed-data-scala
  • pekko-sample-kafka-to-sharding-scala
  • pekko-sample-persistence-scala
  • pekko-sample-sharding-scala

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.

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@LuuOW LuuOW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical audit: code patterns and functional logic verified for system integrity.

@He-Pin He-Pin merged commit 4e78630 into main Jun 17, 2026
2 checks passed
@He-Pin He-Pin deleted the fix/remove-invalid-scala2-compiler-options branch June 17, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants