Commit graph

108 commits

Author SHA1 Message Date
Johan Andrén
3a3e643e07
akka-stream compiling on Scala 3 (#30324)
Changes:
* Private constructor for case class means private apply in Scala 3
* Logger class with Any instead of wildcard where needed
* Explicit import of internal implicit conversion import SinkToCompletionStage
* Hopefully source and binary compatible Scala 3 signature for GraphApply.create methods
* ZipLatestWith leaking private type
* Auto apply-to-lambda made explicit
* Internal async callback event class covariant
* Hub leaking private type
* Remove cycles in stream Buffer classes
* Avoid cyclic import in ResizableMultiReaderRingBuffer
* Safe cast of Subscribers
* Explicit import of internal implicit conversion SourceToCompletionStage
* Ambigous field name and method
* recover delegates using PF from javadsl not inferred, made explicit
* TcpStage completing promise with wrong type
* Collect aggregator empty value cannot be underscore with type ascription
* Some type alias shenanigans in QueueSink removed
* Explicit type on effectiveMaximumBurst in Throttle
* Override method return type not inferred in GraphInterpreter
* MutableCollectorState.accumulated getter got wrong type somehow
* TLS actor fallback case only applicable to null
* Some internal unchecked pattern matching removed
* Ok that createGraph is not present in Java API
* Separate impl per language for implicit actor system apply
2021-07-06 18:01:41 +02:00
Arman Bilge
e714f7bdbc
Inner stages of lazy/future stages should inherit attributes (#30161)
* Add tests for attributes inheritance
* Fix inheritance bugs revealed by tests
2021-06-02 12:48:14 +02:00
Arnout Engelen
79b48ca354
Remove SourceModule/SinkModule newInstance (#30244)
* Remove SourceModule/SinkModule newInstance

AFAICS it's not public API and not called anywhere
Extracted from #30223

* mima excludes
2021-05-19 20:51:30 +02:00
Johan Andrén
ccc4a2f48b
Improved operator string represenation #29935
* New attribute with source location information introduced and added to stages that takes lambdas
* Better default toString for GraphStageLogic including source location where possible
  and used that for debugging, errors and stream snapshots
2021-01-11 15:17:50 +01:00
Arnout Engelen
31f654768f
Update copyright to 2021 2021-01-08 17:55:38 +01:00
kerr
0e4d41ad33
+build Add sort imports support. (#28780)
* Add scalafix plugin for jdk 9.
* Add command alias sortImports.
* Excludes some sources from SortImports.
* Update SortImports to 0.4.0
* Sort imports with `sortImports` command.
2020-04-27 14:32:18 +02:00
ohze.net
ea7205eaf7
dotty phase 2: scalafix ExplicitNonNullaryApply (#28949)
* scalafix ExplicitNonNullaryApply prepare

+ Temporarily use com.sandinh:sbt-scalafix because scalacenter/scalafix#1098
+ Add ExplicitNonNullaryApply rule to .scalafix.conf
+ Manually fix a NonNullaryApply case in DeathWatchSpec that cause
  `fixall` fail because ExplicitNonNullaryApply rule incorrectly rewrite
  `context unbecome` to `context unbecome()` instead of `context.unbecome()`

* scalafix ExplicitNonNullaryApply

fix by enabling only ExplicitNonNullaryApply rule in .scalafix.conf then:
```
% sbt -Dakka.build.scalaVersion=2.13.1
> fixall
```

* scalafmtAll

* Revert to ch.epfl.scala:sbt-scalafix

Co-authored-by: Bùi Việt Thành <thanhbv@sandinh.net>
2020-04-27 12:31:16 +02:00
Johan Andrén
d26453b5e8
Clean up same thread execution contexts #26690
* deprecate internal sameThread ec and use a new one for all internal use sites
* Use the respective Scala version standard library "same thread" ec 
* fallback to the old inline impl on 2.12 when reflection isn't possible
2020-03-10 15:39:30 +01:00
Yakiv Yereskovskyi
a614f0bee7 allow Sink.queue concurrent pulling (#27352)
* allow Sink.queue concurrent pulling

* replace methods with default parameters on two overloaded methods to pass binary compatibility check :/

* replace ⇒ with =>

* reformat

* add javadsl

* fix PR comments and add concurrency to Sink.queue

* fix merge after auto resolving

* duplicate changes to javadsl

* revert source changes

* add graceful terminations

* clean up tests

* optimize imports

* trigger rebuild

* cover the case when materializer shutdown before async callbacks were processed

* vars to vals; fix require messages

* disable compatibility check for @InternalApi private[akka] class
2020-01-24 21:33:39 +01:00
Helena Edelson
6bf20f4117 Update all copyright headers to 2020 after new year's #27881 (#28434) 2020-01-02 13:24:59 +01:00
Johan Andrén
74adecb4e7
Align lazy and future operators #26446 2019-10-16 17:02:12 +02:00
Patrik Nordwall
db132cd216 Final removal of ActorPublisher and ActorSubscriber, #26187
* some messages from ActorSubscriber were also used in other places,
  so moved those to impl.ActorSubscriberMessage
* WatermarkRequestStrategy used by SourceRefImp, so moved there
2019-09-19 13:21:52 +02:00
Johan Andrén
b68d67008a
Deprecate actor materializer (#27538) 2019-09-05 16:08:37 +02:00
Johan Andrén
aca63ea198
Materializer settings as attributes (#27499)
* Replace MaterializerSettings with Attributes #25559 
 * Field access to settings deprecated to make stages use attributes instead
 * Internal stages updated to use attributes
 * Docs on ActorMaterializerSettings updated to recommend away from using it
 * Verify all stages stopped after each testcase in FlowGroupBySpec
 * Subscription timeout attributes merged into one
2019-09-04 13:37:06 +02:00
Johannes Rudolph
16033eaf5e Propagate stream cancellation causes (#27266)
* base functionality
* fix-restart-flow
* Fix subSource / subSink cancellation handling
* GraphStage-fix
* Fix ambiguity between complete and cancellation (for isAvailable / grab)
* rename lastCancellationCause
* add mima
* fix cancellation cause propagation in OutputBoundary
* Fix cancellation cause propagation in SubSink
* Add cancellation cause logging to Flow.log
* add more comments about GraphStage portState internals
* Add some assertions in onDownstreamFinish to prevent wrong usage
* Also deprecate onDownstreamFinish() so that no one calls the wrong one
accidentally
* add SubSinkInlet.cancel(cause)
* Propagate causes in two other places
* Suggest to use `cancel(in, cause)` but don't deprecate old one
2019-08-16 10:53:14 +02:00
Johan Andrén
6e69bc8713
Fix stack overflow in stream converters (#27305) 2019-07-09 13:58:26 +02:00
Christopher Batey
c564a0ff54 Rewrite actor ref sink as a graph stage (#27267) 2019-07-05 13:20:36 +02:00
Johan Andrén
5fe12a3e9d
Subscription timeouts not working #19980 2019-07-05 08:19:46 +02:00
Stefano Bonetti
1ad174cf8c =str #25045 adding Java/Scala interop to SourceQueue and SinkQueue
adding MiMa filters

preserving binary compat
2019-04-15 11:42:06 +02:00
Johan Andrén
17c80b3be9 Race condition in lazy sink on immediate failure (#25413)
* Race condition in lazy sink on immediate failure #25410
2019-03-18 14:28:31 +01:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
Arnout Engelen
d274e039f9
Various scala-2.13.0-M5 fixes
fix akka-actor-tests compile errors

some tests still fail though

Fix test failures in akka-actor-test

Manually work arround missing implicit Factory[Nothing, Seq[Nothing]]

see https://github.com/scala/scala-collection-compat/issues/137

akka-remote scalafix changes

Fix shutdownAll compile error

test:akka-remote scalafix changes

akka-multi-node-testkit scalafix

Fix akka-remote-tests multi-jvm compile errors

akka-stream-tests/test:scalafix

Fix test:akka-stream-tests

Crude implementation of ByteString.map

scalafix akka-actor-typed, akka-actor-typed-tests

akka-actor-typed-tests compile and succeed

scalafix akka-camel

scalafix akka-cluster

akka-cluster compile & test

scalafix akka-cluster-metrics

Fix akka-cluster-metrics

scalafix akka-cluster-tools

akka-cluster-tools compile and test

scalafix akka-distributed-data

akka-distributed-data fixes

scalafix akka-persistence

scalafix akka-cluster-sharding

fix akka-cluster-sharding

scalafix akka-contrib

Fix akka-cluster-sharding-typed test

scalafix akka-docs

Use scala-stm 0.9 (released for M5)

akka-docs

Remove dependency on collections-compat

Cherry-pick the relevant constructs to our own
private utils

Shorten 'scala.collections.immutable' by importing it

Duplicate 'immutable' imports

Use 'foreach' on futures

Replace MapLike with regular Map

Internal API markers

Simplify ccompat by moving PackageShared into object

Since we don't currently need to differentiate between 2.11 and

Avoid relying on 'union' (and ++) being left-biased

Fix akka-actor/doc by removing -Ywarn-unused

Make more things more private

Copyright headers

Use 'unsorted' to go from SortedSet to Set

Duplicate import

Use onComplete rather than failed.foreach

Clarify why we partly duplicate scala-collection-compat
2019-01-11 12:27:18 +01:00
Arnout Engelen
0cc8e20a2e
Various scala-2.13.0-M5 fixes
Clearer imports in TcpDnsClient

Accept SVG's when checking if diagrams were generated

Fix akka-actor MiMa issues

akka-testkit scalafix changes

Update scalatest to 2.13-released snapshot

akka-stream scalafix changes

Update ssl-config

To version that's released with -M5

Take elements directly out of buffer

Manually fix immutable.Seq / Doc link

Make sure the right Concat, Sink is imported

akka-stream binary compat

akka-stream-testkit scalafix

akka-actor-tests scalafix

Eta-expensions
2019-01-11 11:44:35 +01:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Andrea Peruffo
fddc198178 =str Avoid boxing Attributes in java Optional (#25456) 2018-08-20 23:43:46 +09:00
Konrad Malawski
a3f50420db make all Take impls use the same implementation (Sink) 2018-08-03 16:31:28 +09:00
Nafer Sanabria
3a92104160 Impl Sink.takeLast operator
Add documentation

reformatting

Address review comments
2018-08-03 16:31:28 +09:00
Stefan Wachter
3db145643a materialized value of Flow.lazyInit must be a Future #24670 (#24685)
* change materialized value of LazyFlow from [M] to Future[Option[M]]

* remove whitespace

* improve docu

* restore old Flow.lazyInit method and add new Flow.lazyInitAsync method

* fix deprecation messages

* add 2.5.11.backwards.excludes because of changed LazyFlow constructor signature

* check switching behaviour

* apply formatting

* improve deprecation message; improve null safety

* prevent premature stage completion by setting keepGoing

* deprecate Sink.lazyInit; add Sink.lazyInitAsync

* apply formatting

* add ProblemFilter.exclude for changed LazySink.this

* Update Sink.scala

* Update Sink.scala

* Update Flow.scala

* Update Flow.scala
2018-03-19 22:42:37 +09:00
Jimin Hsieh
2c2b8ba001 Remove some of Unused import warning (#24650) 2018-03-16 12:08:29 +01:00
Konrad `ktoso` Malawski
563c7fbcf0 Issue 24594: Integration with sbt-headers and initial header population 2018-03-13 15:45:55 +01:00
Konrad `ktoso` Malawski
171bb6c231 WIP initial typed streams adapters
Adapt ref source and sink for typed

 * do not use the typed teskit temporarily
2018-01-31 15:10:46 +01:00
Johan Andrén
4dde0742d0 Untangle settings from attributes in materializer #24063
Instead of renaming - deprecating and documenting

Renaming defaultInitialAttributes to defaultAttributes and adding docs

Tests passing

More work on using attributes for the attribute settings in ActorMaterializerSettings

Mark some attributes as mandatory and provide a smoother access w/o allocation for those

Another warning notice

MiMa filters

Part of the review adressed

Incorrect rebase fixed + formatting

Review feedback adressed

Formatting ...
2018-01-11 14:14:38 +09:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Johan Andrén
a380d01337
Test coverage for stages using invokeWithFeedback #23953 2017-12-04 16:34:16 +01:00
nachinius
c17a11ddd2 Add Sink.collection #23917 2017-11-29 17:49:31 +01:00
nachinius
994d1d7e67 Revert "Add Sink.collection that generalizes Sink.seq to any immutable collection #23917 2017-11-24 16:37:34 +01:00
nachinius
2c31f57539 Add Sink.collection that generalizes Sink.seq to any immutable collection #23917 (#24016) 2017-11-24 15:19:17 +09:00
Alexander Golubev
9b43ce71ba +str AsyncCallbacks lost on finished stage by error 2017-10-31 10:25:30 -04:00
Alexander Golubev
eff6c409d1 +str fix for "fail offer future when stream is completed" QueueSource/SinkSpec 2017-08-19 23:25:18 -04:00
Johan Andrén
87b28d0dc5 Fail all stages on abrupt termination #22652 2017-04-28 11:11:50 +02:00
Johan Andrén
d5459222aa Substream materialization failure test coverage and fix #22646 2017-04-03 20:21:02 +02:00
Martynas Mickevičius
2a9c0370e0 Add @InternalApi annotations and private markers on internal apis (#22563)
* #22506 Mark materializer extension as @InternalApi

* #22506 Added missing annotations on internal apis in the fusing package

* #22506 Missing annotations in io package

* #22506 Add internal api annotations in impl package

* #22563 more hiding of the classes in the impl package

* #22563 Formatting fixes

* #22506 Fix private access in stream tcl tests
2017-03-16 20:04:07 +01:00
Konrad `ktoso` Malawski
e2a15a2a58 =str use OptionVal in Traversal building 2017-03-10 11:45:26 +01:00
drewhk
87d5b8f627 Wip fix islands drewhk (#22475)
* Fixed island application

* Switched to explicit island boundaries and fixed misapplied island tags

* Added missing attributes for non-stage backed Sinks
2017-03-07 14:26:18 +01:00
drewhk
b33339f13e Make flowspec great again drewhk (#22443)
* #22435: Make DirectProcessorModule work again

* #22435: Fix attributes propagation for FanoutProcessor

* #22435: Remove old "faulty-flow" spec
2017-03-03 10:49:34 +01:00
Endre Sándor Varga
ba63c7af8d New materializer and layout 2017-03-01 16:18:55 +01:00
Alexander Golubev
552481b511 #22030 Lazy sink wait for init 2017-02-16 09:19:25 +01:00