Skip to content

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Mar 4, 2018

Resolves #24656

Provides feature parity between preMaterialize on a Sink and a Source.

TODO:

  • add tests
  • add java api

@akka-ci akka-ci added validating PR is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR is currently being validated by Jenkins labels Mar 4, 2018
@akka-ci
Copy link

akka-ci commented Mar 4, 2018

Test FAILed.

@ktoso ktoso force-pushed the wip-prematerialize-sink branch from ff2f1c9 to f22854c Compare March 5, 2018 01:28
@ktoso ktoso force-pushed the wip-prematerialize-sink branch from f22854c to ec9796e Compare March 5, 2018 01:30
@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Mar 5, 2018
@akka-ci
Copy link

akka-ci commented Mar 5, 2018

Test PASSed.

*
* Useful for when you need a materialized value of a Sink when handing it out to someone to materialize it for you.
*/
def preMaterialize(materializer: Materializer): japi.Pair[Mat @uncheckedVariance, scaladsl.Sink[In @uncheckedVariance, NotUsed]] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

scaladsl.Sink in javadsl

Copy link
Contributor

Choose a reason for hiding this comment

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

are these uncheckedVariance related to #24575 ?
add java api compile test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, thanks

@ktoso
Copy link
Contributor Author

ktoso commented Mar 7, 2018

Not entirely sure if #24575 resolves the

[error] /Users/ktoso/code/akka/akka-stream/src/main/scala/akka/stream/javadsl/Sink.scala:331:7: contravariant type In occurs in invariant position in type (materializer: akka.stream.Materializer)akka.japi.Pair[Mat @scala.annotation.unchecked.uncheckedVariance,akka.stream.javadsl.Sink[In,akka.NotUsed]] of method preMaterialize
[error]   def preMaterialize(materializer: Materializer): japi.Pair[Mat @uncheckedVariance, Sink[In, NotUsed]] = {

that I had here?

Copy link
Contributor Author

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Added docs and java test, should be now ready to merge

@ktoso ktoso force-pushed the wip-prematerialize-sink branch from 45b566c to b5a9694 Compare March 7, 2018 04:52
@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR is currently being validated by Jenkins labels Mar 7, 2018
@akka-ci
Copy link

akka-ci commented Mar 7, 2018

Test PASSed.

@akka-ci akka-ci added needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed tested PR that was successfully built and tested by Jenkins labels Mar 7, 2018
@akka-ci
Copy link

akka-ci commented Mar 7, 2018

Test FAILed.

@ktoso
Copy link
Contributor Author

ktoso commented Mar 8, 2018

Failure was #24672 it indeed is a bug it seems, we'l have to fix it

@ktoso ktoso dismissed patriknw’s stale review March 8, 2018 02:48

please have a look again

@ktoso
Copy link
Contributor Author

ktoso commented Mar 8, 2018

PLS BUILD

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Mar 8, 2018
@akka-ci
Copy link

akka-ci commented Mar 8, 2018

Test PASSed.

@ktoso ktoso merged commit 5be3c7b into akka:master Mar 8, 2018
@ktoso ktoso deleted the wip-prematerialize-sink branch March 8, 2018 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants