refactor: remove deprecated ActorMaterializerSettings, IOSettings and StreamRefSettings factory methods#3293
Merged
Conversation
He-Pin
marked this pull request as draft
July 5, 2026 09:03
He-Pin
added a commit
that referenced
this pull request
Jul 5, 2026
Motivation: PR 3293 still left the deprecated StreamRefSettings public surface and CI failed because stream-tests still used removed ActorMaterializerSettings.withInputBuffer. Modification: Replace the remaining StreamRefSettings usage with internal StreamRefDefaultSettings, remove the public StreamRefSettings type and withStreamRefSettings builder, update MiMa filters, and migrate affected stream tests to configuration or Attributes.inputBuffer. Result: StreamRefSettings is gone from source code outside MiMa filters and stream-tests compile against the removed materializer builder API. Tests: - sbt "stream / Compile / compile" - success - sbt "stream / mimaReportBinaryIssues" - success - sbt "stream-tests / Test / compile" - success - sbt "stream-tests / Test / testOnly org.apache.pekko.stream.scaladsl.StreamRefsSpec org.apache.pekko.stream.scaladsl.FlowSpec" - 69 tests passed - scalafmt --check --mode diff-ref=origin/main - success - sbt headerCreateAll - success - sbt "+headerCheckAll" - success - git diff --check - success - qodercli stdout review - No must-fix findings (/tmp/project-qoder-review.log) - sbt sortImports - failed: Scalafix/scala.meta NoSuchMethodError in multi-node-testkit and stream-tests; unrelated partial changes reverted References: Refs #3293
He-Pin
marked this pull request as ready for review
July 5, 2026 09:56
Motivation: Several ActorMaterializerSettings builder methods and materializer-specific settings types were deprecated since Akka 2.6.0. For Pekko 2.0.0 these public APIs can be removed while preserving internal defaults used by streams, TCP, and Artery. Modification: Remove ActorMaterializerSettings.withInputBuffer, public withDispatcher, withIOSettings, withStreamRefSettings, IOSettings, StreamRefSettings, and StreamRefSettingsImpl. Inline IO defaults as internal ActorMaterializerSettings fields, replace stream-ref defaults with internal StreamRefDefaultSettings, update TCP and stream-ref stages, update and prune MiMa filters, and migrate affected stream tests to config or Attributes.inputBuffer. Result: Deprecated materializer settings APIs are gone from the public/source API, internal stream/TCP defaults continue to work, and stream-tests no longer depend on removed builder methods. Tests: - sbt "stream / Compile / compile" - success - sbt "stream / mimaReportBinaryIssues" - success - sbt "+stream / mimaReportBinaryIssues" - success - sbt "stream-tests / Test / compile" - success - sbt "stream-tests / Test / testOnly org.apache.pekko.stream.scaladsl.StreamRefsSpec org.apache.pekko.stream.scaladsl.FlowSpec org.apache.pekko.stream.scaladsl.AttributesSpec org.apache.pekko.stream.scaladsl.FlowRecoverWithSpec org.apache.pekko.stream.scaladsl.FlowSlidingSpec org.apache.pekko.stream.scaladsl.FlowZipWithIndexSpec org.apache.pekko.stream.scaladsl.TakeLastSinkSpec" - 156 tests passed, 1 pending - sbt "stream-tests / Test / testOnly org.apache.pekko.stream.scaladsl.GraphFlowSpec" - 15 tests passed - scalafmt --check --mode diff-ref=<merge-base> - success - sbt headerCreateAll - success - sbt "+headerCheckAll" - success - git diff --check <merge-base> - success - qodercli stdout review (/tmp/project-qoder-review-final.log) - No must-fix findings - subAgent review - No must-fix findings - sbt sortImports - failed: Scalafix/scala.meta NoSuchMethodError in multi-node-testkit and stream-tests; unrelated partial changes reverted References: Refs #3293
He-Pin
force-pushed
the
remove-actor-materializer-deprecated
branch
from
July 5, 2026 10:18
e054c5d to
b41f48b
Compare
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
Several
ActorMaterializerSettingsbuilder methods (withInputBuffer,withDispatcher), theIOSettingsfactory/constructor, and theStreamRefSettingsfactory were deprecated since Akka 2.6.0. Since Pekko 2.0.0 is a major version bump, these can be safely removed from the public API.Modification
ActorMaterializerSettings.withInputBuffer(deprecated since Akka 2.6.0)ActorMaterializerSettings.withDispatcherfrom public deprecated toprivate[pekko](still used internally by the remote module'sArterySettings)IOSettings.apply(config)factory and deprecated binary-compat constructorIOSettings(tcpWriteBufferSize: Int)IOSettingsconstructor fromprivatetoprivate[stream]for internal instantiationStreamRefSettings.apply(config)factoryIOSettingsandStreamRefSettingsconstruction inActorMaterializerSettings.applyResult
Deprecated Akka 2.6.0 era APIs are removed from the public surface while preserving internal functionality used by the remote module.
Tests
sbt "stream / Compile / compile" "remote / Compile / compile"- successsbt "stream / Test / compile" "remote / Test / compile"- successsbt "+stream / mimaReportBinaryIssues" "+remote / mimaReportBinaryIssues"- no issuesReferences
None - proactive cleanup of deprecated APIs before Pekko 2.0.0 release