Conversation
Motivation: The 2.13/3-only modules still carried Scala 2.12-era idioms: `immutable.Seq` qualifiers (`scala.Seq` has been `immutable.Seq` since 2.13) and `.toIterator` in the scripted interop test. Equivalent of apache/pekko#3539. Modification: - Replace `immutable.Seq` with `Seq` in runtime, interop-tests, benchmarks and the `gen-scala-server/00-interop` scripted test (all built for 2.13/3 only) and drop the now-unused `scala.collection.immutable` imports. - `requests.toIterator` -> `requests.iterator` in `PekkoGrpcClientTester` (scripted test). - `codegen`, `maven-plugin`, `sbt-plugin` main sources and `scalapb-protoc-plugin` still cross-build for 2.12 where `scala.Seq` is `collection.Seq`, so they are left unchanged. Result: No remaining Scala 2.12 collection idioms in the 2.13/3-only modules. Source and binary compatible: `scala.Seq` is a type alias for `scala.collection.immutable.Seq` on 2.13 and 3, so the erasure and generic signatures are unchanged. Tests: - native scalafmt on all changed files - sbt runtime/mimaReportBinaryIssues on 2.13.18 and 3.3.8: passes - sbt runtime/test on 2.13.18: 178 passed - sbt runtime/Test/compile interop-tests/Test/compile benchmarks/compile on 2.13.18 and 3.3.8 - sbt "sbt-plugin/scripted gen-scala-server/00-interop": passes References: None - equivalent of apache/pekko#3539
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 2.13/3-only modules still carried Scala 2.12-era idioms:
immutable.Seqqualifiers (scala.Seqhas beenimmutable.Seqsince 2.13) and.toIteratorin the scripted interop test.This is the pekko-grpc equivalent of apache/pekko#3539.
Modification
immutable.SeqwithSeqinruntime,interop-tests,benchmarksand thegen-scala-server/00-interopscripted test (all built for 2.13/3 only) and drop the now-unusedscala.collection.immutableimports.requests.toIterator->requests.iteratorinPekkoGrpcClientTester(scripted test).codegen,maven-plugin,sbt-pluginmain sources andscalapb-protoc-pluginstill cross-build for Scala 2.12, wherescala.Seqiscollection.Seq, so they are intentionally left unchanged (same reasoning asproject/in the pekko PR).The other idioms covered by the pekko PR (
WrappedArray,filterKeys/mapValues,Eitherprojections,Stream) have no occurrences in this repo.Result
No remaining Scala 2.12 collection idioms in the 2.13/3-only modules. Source and binary compatible:
scala.Seqis a type alias forscala.collection.immutable.Seqon 2.13 and 3, so erasure and Java generic signatures are unchanged; no MiMa filters needed.Tests
scalafmton all changed filessbt runtime/mimaReportBinaryIssueson 2.13.18 and 3.3.8: passes (compared against 1.0.2)sbt runtime/teston 2.13.18: 178 passedsbt runtime/Test/compile interop-tests/Test/compile benchmarks/compileon 2.13.18 and 3.3.8sbt "sbt-plugin/scripted gen-scala-server/00-interop": passesReferences
None - equivalent of apache/pekko#3539