chore: remove leftover Scala 2.12 idioms - #625
Merged
Merged
Conversation
Motivation: The codebase still carried the Scala 2.12-era `immutable.Seq` qualifier throughout main, test and doc sources. `scala.Seq` has been an alias for `scala.collection.immutable.Seq` since Scala 2.13, so the qualifier and the `scala.collection.immutable` imports that exist only to support it are redundant. This mirrors apache/pekko#3539. Modification: - Replace `immutable.Seq` with `Seq` across 37 Scala files and drop the `scala.collection.immutable` imports that are no longer referenced (kept where `immutable.IndexedSeq`/`immutable.Set` are still used). - Drop the explicit `import scala.collection.immutable.Seq` lines. - Paradox prose (cassandra, jdbc, r2dbc, slick) updated from `immutable.Seq` to `Seq` to match the doc snippets. The other idioms addressed upstream (`WrappedArray`, `filterKeys`/ `mapValues`, `Either` projections, `toIterator`, `Stream`) do not occur in this repository. Result: No remaining Scala 2.12 collection idioms in main, test or doc sources. Source- and binary-compatible: same type, same erasure. Tests: - native `scalafmt --mode diff-ref=upstream/main` run on changed files - `sbt Test/compile jdbc-int-test/Test/compile r2dbc-int-test/Test/compile slick-int-test/Test/compile` passes on Scala 2.13 and 3.3 - `sbt core/mimaReportBinaryIssues jdbc/mimaReportBinaryIssues slick/mimaReportBinaryIssues cassandra/mimaReportBinaryIssues eventsourced/mimaReportBinaryIssues durable-state/mimaReportBinaryIssues r2dbc/mimaReportBinaryIssues` passes (grpc has MiMa disabled) - `git diff --check` clean References: None - mirrors apache/pekko#3539; Scala 2.12 support was dropped previously
Philippus
approved these changes
Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The codebase still carried the Scala 2.12-era
immutable.Seqqualifier throughout main, test and doc sources.scala.Seqhas been an alias forscala.collection.immutable.Seqsince Scala 2.13, so the qualifier and thescala.collection.immutableimports that exist only to support it are redundant. This is the pekko-projection equivalent of apache/pekko#3539.Modification
immutable.SeqwithSeqacross 37 Scala files and drop thescala.collection.immutableimports that are no longer referenced (kept whereimmutable.IndexedSeq/immutable.Setare still used).import scala.collection.immutable.Seqlines.immutable.SeqtoSeqto match the doc snippets.The other idioms addressed upstream (
WrappedArray,filterKeys/mapValues,Eitherprojections,toIterator,Stream) do not occur in this repository, so this PR is smaller in scope than the pekko one.Result
No remaining Scala 2.12 collection idioms in main, test or doc sources. Source- and binary-compatible: same type, same erasure, no MiMa filters needed.
Tests
scalafmt --mode diff-ref=upstream/mainrun on changed filessbt Test/compile jdbc-int-test/Test/compile r2dbc-int-test/Test/compile slick-int-test/Test/compilepasses on Scala 2.13 and 3.3sbt core/mimaReportBinaryIssues jdbc/mimaReportBinaryIssues slick/mimaReportBinaryIssues cassandra/mimaReportBinaryIssues eventsourced/mimaReportBinaryIssues durable-state/mimaReportBinaryIssues r2dbc/mimaReportBinaryIssuespasses (grpc has MiMa disabled)git diff --checkcleanReferences
None - mirrors apache/pekko#3539; Scala 2.12 support was dropped previously