krasserm/streamz

Intended streamz-camel-akka dependency on FS2, Cats-Effect & Cats-Core?

sarahgerweck opened this issue · 4 comments

When I look at the discussion in akka/alpakka#74, I get the impression that streamz-camel-akka was intended to have no dependencies except Akka Streams and Apache Camel. However, when I look at the published POM for version 0.9, it declares that this module depends on streamz-camel-context, and both streams-camel-akka and streamz-camel-context depend on FS2 0.10.1.

This dependency on FS2 then triggers dependencies on cats-effect, cats-core, cats-kernel, cats-macros and machinist.

Is it intended that all these dependencies are required just to use the Camel-to-Akka bridge that's advertised in Alpakka? If not, you probably need to either modify your build so streams-camel-akka doesn't depend on streamz-camel-context or modify streamz-camel-context so it doesn't declare any of these dependencies.

This is more than an academic concern for me: I have other dependencies on these libraries and can't justify the diamond dependencies for this bridge, which otherwise seems quite suitable for my use case.

No, this is not intended. Thanks for bringing this issue up. The problem is that streamz-converter erroneously declares its dependencies with in ThisBuild which causes FS2 to be a dependency of all modules. This is of course a bug. streamz-camel-akka and streamz-camel-context do not declare a dependency on FS2. However, the dependency of streamz-camel-akka on streamz-camel-context is intended.

I'll fix that in the next days and cut a new release. Feel free to open a pull request if you want to fix it yourself.

@krasserm I tried just pulling out the in ThisBuild and it seems to be all that's required to address the problem. I opened a PR in case it's useful.

While testing this, I did find that sbt test sometimes intermittently fails for me with these messages. The intermittent nature first made me think it might be related to these changes, but I'm pretty sure it was a red herring as I've seen it in the current project. Would you like a separate issue for this?

[info] - must propagate errors from pipe to flow *** FAILED ***
[info]   java.lang.AssertionError: assertion failed: timeout (10 seconds) during expectMsg while waiting for Failure(java.lang.Exception: test)

I tried just pulling out the in ThisBuild and it seems to be all that's required to address the problem. I opened a PR in case it's useful.

Absolutely, thank you very much! Regarding, the intermittent failures, this is not related to your PR and should be tracked as a separate issue.

@krasserm I'm glad this was useful. I'll file a separate issue for the intermittent local-build issues I saw.