Skip to content

chore: remove leftover Scala 2.12 idioms - #625

Merged
pjfanning merged 1 commit into
apache:mainfrom
pjfanning:remove-scala-2.12-idioms
Sep 13, 2026
Merged

pjfanning merged 1 commit into
apache:mainfrom
pjfanning:remove-scala-2.12-idioms

Conversation

@pjfanning

Copy link
Copy Markdown
Member

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 is the pekko-projection equivalent of 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, 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

  • 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
  • Test runs: relying on CI (no behavior change)

References

None - mirrors apache/pekko#3539; Scala 2.12 support was dropped previously

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
@pjfanning
pjfanning merged commit 18f73ba into apache:main Sep 13, 2026
30 checks passed
@pjfanning
pjfanning deleted the remove-scala-2.12-idioms branch September 13, 2026 07:37
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.

2 participants