thurstonsand / scala-cass

a wrapper for the Java Cassandra driver that allows extraction from a Row with Scala types, or directly into a case class. Also has utility functions for the Session to read/write to Cassandra directly to/from a case class.
MIT License
21 stars 10 forks source link

supporting datastax cassandra-driver 3 #7

Closed stephennancekivell closed 8 years ago

stephennancekivell commented 8 years ago

Hey,

How are you going to support "com.datastax.cassandra" % "cassandra-driver-core" % "3.0.0". Its not binary compatible, so you'll probably need a different version :(

thurstonsand commented 8 years ago

dang didn't realize that. I can have 2 versions release. any suggestions on what I should name them? something like "scala-cass-cassandra22" and make "scala-cass" the 3.0.0+ compatible version?

stephennancekivell commented 8 years ago

Maybe take a look at how other libraries do it. Things that depend on scalaz have this issue a bit, like argonaut, they just have a different version.

eg

The 6.1.x release supports scala 2.10.* and 2.11.* with scalaz 7.1.*.
The 6.2.x release supports scala 2.10.* and 2.11.* with scalaz 7.2.*.

You'd want to be careful to keep differences pretty small though to easily actively develop both. cassandra-driver-core 2.x might be around for a while.

stephennancekivell commented 8 years ago

I started a branch to see how much the impact it was. Looks like its not too much.

https://github.com/stephennancekivell/scala-cass/tree/driver-3

Im not sure what you want to do about this one though. Could just take out that validation and put it in a Try??

[error] ~/src/main/scala/com/weather/scalacass/CassFormatDecoder.scala:168: value asJavaClass is not a member of com.datastax.driver.core.DataType
[error]  Note: implicit value blobFormat is not applicable here because it comes after the application point and it lacks an explicit result type
[error]       val cassClass = r.getColumnDefinitions.getType(name).asJavaClass
thurstonsand commented 8 years ago

I just put up a pull request against your pull request with a fix. When you open up a pull request back to my repo, set it to merge with master, and I'll create a branch for cassandra 2.2. I think I'll do what you suggested, which is pretty similar to nodejs versioning too. 0.3.x for cassandra 2.2, 0.4.x for cassandra 3+.

thurstonsand commented 8 years ago

should be fixed by pull request #10 in version 0.3.* and 0.4.* out now.

stephennancekivell commented 8 years ago

Thats pretty cool. Great solution.