Skip to content

refactor: remove deprecated ActorMaterializerSettings, IOSettings and StreamRefSettings factory methods#3293

Merged
He-Pin merged 1 commit into
mainfrom
remove-actor-materializer-deprecated
Jul 5, 2026
Merged

refactor: remove deprecated ActorMaterializerSettings, IOSettings and StreamRefSettings factory methods#3293
He-Pin merged 1 commit into
mainfrom
remove-actor-materializer-deprecated

Conversation

@He-Pin

@He-Pin He-Pin commented Jul 5, 2026

Copy link
Copy Markdown
Member

Motivation

Several ActorMaterializerSettings builder methods (withInputBuffer, withDispatcher), the IOSettings factory/constructor, and the StreamRefSettings factory 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

  • Remove ActorMaterializerSettings.withInputBuffer (deprecated since Akka 2.6.0)
  • Change ActorMaterializerSettings.withDispatcher from public deprecated to private[pekko] (still used internally by the remote module's ArterySettings)
  • Remove IOSettings.apply(config) factory and deprecated binary-compat constructor IOSettings(tcpWriteBufferSize: Int)
  • Change IOSettings constructor from private to private[stream] for internal instantiation
  • Remove StreamRefSettings.apply(config) factory
  • Inline IOSettings and StreamRefSettings construction in ActorMaterializerSettings.apply
  • Add MiMa exclusion filters for the removed methods

Result

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" - success
  • sbt "stream / Test / compile" "remote / Test / compile" - success
  • sbt "+stream / mimaReportBinaryIssues" "+remote / mimaReportBinaryIssues" - no issues

References

None - proactive cleanup of deprecated APIs before Pekko 2.0.0 release

@He-Pin
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
He-Pin marked this pull request as ready for review July 5, 2026 09:56
@He-Pin He-Pin added the t:stream Pekko Streams label Jul 5, 2026
@He-Pin He-Pin added this to the 2.0.0-M4 milestone Jul 5, 2026
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
He-Pin force-pushed the remove-actor-materializer-deprecated branch from e054c5d to b41f48b Compare July 5, 2026 10:18

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@He-Pin
He-Pin merged commit 535a5fa into main Jul 5, 2026
9 checks passed
@He-Pin
He-Pin deleted the remove-actor-materializer-deprecated branch July 5, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:stream Pekko Streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants