You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/09/12 09:35:10 UTC

[PR] chore: remove leftover Scala 2.12 idioms [pekko-management]

pjfanning opened a new pull request, #970:
URL: https://github.com/apache/pekko-management/pull/970

   ### Motivation
   The codebase still carried the Scala 2.12-era `immutable.Seq` qualifier (and its `scala.collection.immutable` / `scala.collection.immutable.Seq` imports). On Scala 2.13 and 3, `scala.Seq` is already an alias for `scala.collection.immutable.Seq`, so the qualifier is redundant. This is the pekko-management equivalent of apache/pekko#3539.
   
   Unlike the core repo, there were no other 2.12 idioms to clean up here: no `WrappedArray`, `filterKeys`/`mapValues`, `.toIterator`, `Stream`, or `Either` projections, and no paradox anchors referencing `immutable.Seq`.
   
   ### Modification
   - Replace `immutable.Seq` with `Seq` across 24 files and drop the now-unused `scala.collection.immutable`, `scala.collection.immutable.Seq` and `scala.collection.{ immutable => im }` imports.
   - Files that still use other `immutable.*` types (`Set`, `Iterable`, `SortedSet`) keep the `scala.collection.immutable` import (`ClusterHttpManagementProtocol`, `BootstrapCoordinator`, `PodDeletionCostAnnotator`).
   - `ClusterHttpManagementRoutesSpec`: swap the `scala.collection.immutable._` wildcard for an explicit `SortedSet` import.
   - `ConsulServiceDiscovery`: drop the redundant `scala.collection.immutable.Seq(targets: _*)` copy, since `targets` is already an immutable `Seq`.
   
   ### Result
   No remaining Scala 2.12 collection idioms in main or test sources. Source- and binary-compatible: `Seq` has the same erasure, so MiMa passes without new filters.
   
   ### Tests
   - native `scalafmt --mode diff-ref=upstream/main`
   - `sbt +Test/compile` passes on Scala 2.13, 3.3 and 3-next
   - `sbt <module>/mimaReportBinaryIssues` passes for all touched modules (management, management-cluster-http, management-cluster-bootstrap, discovery-kubernetes-api, discovery-marathon-api, discovery-aws-api, discovery-aws-api-async, discovery-consul, lease-kubernetes, rolling-update-kubernetes)
   - `sbt <module>/test` passes for all touched modules; `ConsulDiscoverySpec` not run locally as it requires Docker/testcontainers (relying on CI)
   
   ### References
   None - equivalent of apache/pekko#3539
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] chore: remove leftover Scala 2.12 idioms [pekko-management]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #970:
URL: https://github.com/apache/pekko-management/pull/970


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org