Commit graph

1788 commits

Author SHA1 Message Date
kerr
6b5d544deb
Add Source.fromJavaStream as convenient method alias (#28881) 2020-04-28 11:15:11 +02:00
contrun
c2945a3e7f
Docs: API docs for asSourceWithContext (#28950) 2020-04-27 16:15:28 +02: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
Bùi Việt Thành
02b9b30354 scalafix ExplicitResultTypes - for implicit members 2020-04-20 17:59:50 +07:00
Bùi Việt Thành
4df76d6bce scalafix FinalObject 2020-04-20 17:59:49 +07:00
Bùi Việt Thành
46a310e2cc scalafix ConstructorProcedureSyntax
fix by:
+ enabling only ConstructorProcedureSyntax rule in .scalafix.conf
+ then:
```
% sbt -Dakka.build.scalaVersion=2.13.1
> fixall
> scalafmtAll
```
2020-04-20 17:59:49 +07:00
Jacky Nguyen
89f920a198
SubscriptionTimeout schedule leak in FanoutProcessor #28810 2020-03-31 09:17:50 +02:00
Renato Cavalcanti
1971500827
Merge pull request #28785 from hepin1989/noClosure
=str Don't create closure
2020-03-30 12:03:51 +02:00
Patrik Nordwall
e151536e81 mima: check against 2.6.4, and missing filters 2020-03-27 11:54:42 +01:00
Ignasi Marimon-Clos
f683241c40
Docs: examples for io streams with StreamConverters (#28746) 2020-03-27 09:56:59 +01:00
Yakiv Yereskovskyi
5605f04cb7
allow Source.queue concurrent pushing (#28273) 2020-03-26 10:56:45 -04:00
hepin1989
92cbec8568 =str Don't create closure 2020-03-23 22:28:49 +08:00
Jacek Ewertowski
2cccfa3c29
Stream: Sugar for Sink.ignore #27789, #24986 2020-03-23 13:05:25 +01:00
Eike Wacker
630e712b9f
Allow a read of length 0 in InputStreamAdapter #28751 (#28759) 2020-03-20 11:33:00 +01:00
Ignasi Marimon-Clos
3d8b4360f0
Docs: Example on the as/fromJavaStream operators (#28745) 2020-03-18 15:54:21 +01:00
Arnout Engelen
dba69dba1d
Add docs and examples for RS fromPublisher #25468 2020-03-11 15:56:59 +01: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
Johan Andrén
c46861ed26
Add LogWithMarker to Akka Stream #28450 2020-03-05 15:05:05 +01:00
Arnout Engelen
e487088a27
Allow closing StreamConverter InputStream twice #28664 2020-03-04 17:12:50 +01:00
Johannes Rudolph
655dfbc67f
stream: don't create AbruptTerminationException in happy case (#28686)
Turned up in heavy stream materialization churn benchmark.
2020-03-04 17:11:23 +01:00
Johan Andrén
3157b0199b
MapAsync wouldn't complete when upstream does in all scenarios #28657 2020-03-03 17:17:50 +01:00
eyal farago
5bb9a7145a
stream: provide mapMaterializedValue for Graph (#28610) 2020-02-20 13:30:32 +01:00
Arnout Engelen
8a354ec3f0
stream: Improve half-closing of outgoing TCP connections (#28624)
Notably fixes the case where upstream finished before the connection
was successfully established, and avoids RSTing the incoming stream
when the outgoing stream is done (which is now possible due to the
cancellation reason being propagated).
2020-02-20 13:28:21 +01:00
eyal farago
ccd8481fec
stream: add flatMapPrefix operator (#28380) 2020-02-05 15:37:27 +01:00
Patrik Nordwall
f6bea845ca
update MiMa latestPatch (#28534)
* update MiMa latestPatch

* Even later latest

* exclude jdk9 classes in 2.6.x excludes

* mima exclude for SystemMaterializer.materializer type

Co-authored-by: Johan Andrén <johan@markatta.com>
2020-02-04 15:43:13 +01:00
Johannes Rudolph
1fbd1d338f
stream: fail eagerly during SubSink/SubSource materialization (#28492)
This way the stack trace will be more helpful because it contains the stage
that actually triggered the materialization.

Otherwise, we will only fail during `preStart` in the interpreter where the
stage will be failed and the error be propagated through the stream where
it can be hard to figure out what happened.

Also improve the message itself to contain the user provided name of the
sink/source.
2020-02-04 11:04:31 +01:00
Arnout Engelen
6dbbfd53f0 Explicit SystemMaterializer.materializer return value 2020-01-30 12:19:52 +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
Johannes Rudolph
c39dd6506e
stream: filter out elements without demand
This will also mean that completion will not be blocked by elements that
will later be filtered out.

One particular use case of that would be a kind of partitioning use case,
where you put several streams behind a broadcast and each consumer will filter
out elements not handled there. In that case, the broadcast can get head-of-line
blocked when one of the consumers currently has no demand but also wouldn't
have to handle any elements because they would all be filtered out.
2020-01-22 10:26:46 +01:00
Johan Andrén
fc0c98e17a
Support cancellation propagation in StreamRefs #28317 2020-01-20 10:28:26 +01:00
__
e182c5a1fc Add stream name to buffer overflow log message (#28159)
* Add stream name to buffer overflow log message (#28085)

* De-emphasize stream name by moving it to the back

Co-authored-by: Arnout Engelen <github@bzzt.net>
2020-01-06 16:18:43 +01:00
Safta Catalin Mihai
6278968af5 Fix RetryFlow not stopping after maxRetries (#28443)
- the check for retryNo was pattern matching on tuple instead of any value
2020-01-03 21:07:19 +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
tison
03ce8a9349 [doc] Fix scala doc in javadsl.FileIO (#28328) 2019-12-26 11:42:04 +01:00
Brian Wignall
fd41299943 Fix typos, via a Levenshtein-style corrector 2019-12-19 01:57:55 -05:00
Arnout Engelen
a3ca3a3fca Perform MiMa checks against 2.6.1 (#28324)
* Exclude jdk9+-specific classes from mima

as in https://github.com/akka/akka/pull/24297#issue-162564159
2019-12-13 17:05:16 +01:00
Patrik Nordwall
0008f1f400 Partition must not pull from closed in, #27189 2019-12-10 17:33:11 +01:00
Andrey Yamshchikov
87b94b65fd Add Java DSL Flow#mapError version without PartialFunction (#24992) (#26310)
* Add an overloaded version of the Flow#mapError (Java DSL) which does not use a Scala PartialFunction.
* Add test verifying mapError matching on parent class
* Add to Source, SubSource and SubFlow as well
2019-12-10 13:05:56 +01:00
Brian Wignall
10e61e816f Fix typos (#28326) 2019-12-09 08:41:55 +01:00
Arnout Engelen
25ad10f893
Document asSubscriber stage (#28128)
* Unfortunately it seems the jdk9-only tests could not actually be compiled.
With these changes those can actually be compiled and ran again.

* Always link to jdk11 for java.* javadocs

* Update sbt-paradox-akka to fix linking to inner classes for javadoc
2019-12-05 16:40:05 +01:00
Johannes Rudolph
702b6a7f41 actor: allow seamless access to untyped extensions given typed ActorSystem (#28294)
* actor: allow seamless access to untyped extensions given typed ActorSystem

* add overrides with concrete type for Java API everywhere
2019-12-05 16:01:22 +01:00
Johannes Rudolph
d0027850e6
build: fix mima checking for Akka 2.6.0 (#28300)
Previously, due to a syntax problem, only typed artifacts were checked against
2.6.0.

Co-Authored-By: Arnout Engelen <github@bzzt.net>
2019-12-04 15:40:38 +01:00
Johan Andrén
583fe3e2a4
Delay operator emit early fix #28269
* Bugfix for delay stage with EmitEarly #28269

Emit early would make it pull eagerly even if out was not available,
when element arrived and buffer was full and out not available that
element would be left in the input port and never end up in the buffer.

* Additional cleanup of the Delay stage
2019-11-29 14:46:51 +01:00
sullis
dbc97fb6f3 Scala 2.13.0 -> Scala 2.13.1 (#28140)
* Scala 2.13.0 -> Scala 2.13.1

* Update to genjavadoc 0.15

* Allow 'higherKinds' without explicit import

To follow the 2.13.1 convention

* Remaining higherKinds imports

* Mima excludes for missing value classes in generics
2019-11-29 13:38:19 +01:00
Jean-Baptiste Giraudeau
6d893fb571 Flow.delayWith allows custom delay for each element. (#25000) 2019-11-27 17:30:56 +01:00
Christopher Batey
09a97ce1c9 Document scanAsync (#28239)
* Document scanAsync

* Include async function in scanAsync example
2019-11-26 12:25:20 +01:00
Johannes Rudolph
0384baa53e Small interpreter metadata fixes (#28218)
* stream: debug dot output should point `shouldPush` in the right direction

* stream: also support Pushing and Pulling states for ConnectionSnapshot

Using ShouldPull for Pushing and ShouldPush for Pulling is not quite accurate
but probably good enough for now.
2019-11-25 10:48:25 +01:00
Johan Andrén
d385c1098a
Operator docs for Source.combine (#28195) 2019-11-22 14:42:36 +01:00
Johan Andrén
61bd3d42b6
Document and fix getAsyncCallback thread safety issues #27999 2019-11-22 13:38:06 +01:00