Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StreamDeconstructorProxy.nodesFrom throws MatchError #4

Closed
mihbor opened this issue Jan 22, 2018 · 5 comments
Closed

StreamDeconstructorProxy.nodesFrom throws MatchError #4

mihbor opened this issue Jan 22, 2018 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mihbor
Copy link

mihbor commented Jan 22, 2018

v0.7_2.5.6

scala.MatchError: Transform(akka.stream.scaladsl.package$SinkToCompletionStage$$$Lambda$181/1070501849@44a2b17b) (of class akka.stream.impl.Transform)
	at akka.stream.StreamDeconstructorProxy$.$anonfun$nodesFrom$1(StreamDeconstructorProxy.scala:62)
	at akka.stream.StreamDeconstructorProxy$.$anonfun$nodesFrom$1$adapted(StreamDeconstructorProxy.scala:39)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at akka.stream.StreamDeconstructorProxy$.nodesFrom(StreamDeconstructorProxy.scala:39)
	at akka.stream.StreamDeconstructorProxy$.processTraversal(StreamDeconstructorProxy.scala:29)
	at akka.stream.StreamDeconstructorProxy$.apply(StreamDeconstructorProxy.scala:20)
	at net.mikolak.travesty.package$.toAbstractGraph(package.scala:43)
	at net.mikolak.travesty.package$.prepare(package.scala:68)
	at net.mikolak.travesty.package$.toFile(package.scala:29)
@mikolak-net mikolak-net self-assigned this Jan 22, 2018
@mikolak-net mikolak-net added this to the v0.8 milestone Jan 22, 2018
@mikolak-net mikolak-net added the bug Something isn't working label Jan 22, 2018
@mikolak-net
Copy link
Owner

@mihbor : thank you for the report! As far as I recall, I haven't managed to trigger the Transform step in the tests done for the preliminary release.

Would it possible for you to provide an example of a Graph that triggers the MatchError?

@mihbor
Copy link
Author

mihbor commented Jan 25, 2018

I'm afraid I can't provide the code, but the outline is as follows:
I have a Source (from reactive-kafka) followed by .map()
I also have a flow created with Flow.of() which has .map(), .filter(), .filter(), .map() applied on it.
Then the 2 are merged together and a .keepAlive() is applied to the result.

That's the flow I want to visualise, but since travesty requires a ClosedGraph, I prefixed it with a Source and sunk it to a Sink.ignore() just for the purpose of trying to graph it, like so:
Source.single(...).to(flow.to(Sink.ignore()))
where "flow" is the graph I described above.
(all this is in Java btw)
Hope that is somewhat helpful.

@mikolak-net
Copy link
Owner

No problem about the exact code, an outline as you provided is fine. I'll see if I can reproduce it with the information given and follow up on this.

Comment re ClosedGraph - unfortunately this is an external requirement :(. Akka Streams does not allow for generating a Traversal for a non-closed Graph (at least in the current versions) - specifically, it throws an exception.

@mikolak-net
Copy link
Owner

Fixed in 0.8. I'm guessing it was actually a mapMaterializedValue call that caused the issue, since it's the one that usually generates a Transform in a Traversal. If you still have this problem in 0.8, please reopen the issue.

@mikolak-net
Copy link
Owner

@mihbor : FYI, version 0.9 supports drawing non-closed graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants