manub / scalatest-embedded-kafka

A library that provides an in-memory Kafka instance to run your tests against.
MIT License
295 stars 87 forks source link

Support Scala 2.12 #48

Closed manub closed 7 years ago

manub commented 7 years ago

This could cause problems in supporting Scala 2.10.

cb372 commented 7 years ago

+1 for this. I just tried to add Scala 2.12 cross-building to akka-stream-kakfa but I found that this library was a blocker.

manub commented 7 years ago

I wonder how does the community feel about removing support for Scala 2.10.

manub commented 7 years ago

Kafka is not yet published for 2.12.0 and this library depends on that. There's a PR pending - https://github.com/apache/kafka/pull/2113. I'll try to understand what are their plans.

manub commented 7 years ago

They merged that PR - I'm just waiting for the 2.12 artifacts to be published.

ktoso commented 7 years ago

For what it's worth Akka related tools are all on 2.11+ (since a year or so) (and eagerly awaiting 2.12 for this) so we can merge @cb372's PR (just giving it as a datapoint) :-)

manub commented 7 years ago

Hey @ktoso, thanks for popping by :) It seems that the Kafka people have merged the PR for 2.12 support but I can't see the artifacts anywhere as I write. I asked on the ticket referenced earlier on when it's expected to see published artifacts, so I can update my build.

manub commented 7 years ago

It seems that based on https://cwiki.apache.org/confluence/display/KAFKA/Time+Based+Release+Plan next release will happen in Jan 2017. Not sure if they plan to release current version binaries for 2.12.

manub commented 7 years ago

https://github.com/apache/kafka/pull/2113#issuecomment-260159755 - it seems promising.

manub commented 7 years ago

https://github.com/apache/kafka/pull/2164 is still open. Once this get merged we should be able to get latest patch version compiled for 2.12 and hopefully unblock this.

analytically commented 7 years ago

apache/kafka#2164 is fixed now.

manub commented 7 years ago

Yes, but artifacts are not published yet. I think there will be a new release soon.

leachbj commented 7 years ago

There are rc0 builds now available, but no artifacts just yet. Build them locally with ./gradlew install_2_12 from the 0.10.1.1-rc0 tag.

manub commented 7 years ago

Thanks. To build this in CI I need to wait until the arifacts are published, although I will be able to test locally. I saw in the ML that this is a pre-alpha version, it's worth to be noting this when scalatest-embedded-Kafka will be released.

leachbj commented 7 years ago

kafka RC1 artifacts are now published to https://repository.apache.org/content/groups/staging/org/apache/kafka/.

They are designated pre-alpha as they have not received extensive testing from the Kafka team, the only difference between the 2.11 and 2.12 versions are the compiler/JVM with the 2.12 being built with 2.12.1 and Java8.

manub commented 7 years ago

Do you know if they're planning to publish 0.10.1.1 on Maven Central? I can't seem to find them there.

manub commented 7 years ago

Fixed in version 0.11.0!

leachbj commented 7 years ago

@manub those builds won't work in general until the kafka artifacts are in maven central. The current ones are still RC1, it looks like they'll get promoted very soon though.

manub commented 7 years ago

@leachbj are the binaries going to be different? The artefacts aren't tagged rc1...

leachbj commented 7 years ago

I think the final artefacts are the same as the rc1. Looks like the Apache process doesn't version as rc1 and just limits publishing them to the staging repository. The final binaries are now in maven central; https://mvnrepository.com/artifact/org.apache.kafka/kafka_2.12/0.10.1.1