outworkers / phantom

Schema safe, type-safe, reactive Scala driver for Cassandra/Datastax Enterprise
http://outworkers.github.io/phantom/
Apache License 2.0
1.05k stars 186 forks source link

Is JDK8 module integrated into the main DSL module? #922

Open lukaszlenart opened 3 years ago

lukaszlenart commented 3 years ago

I'm trying to upgrade PhantomDSL to version 2.59.0 and I noticed that this version already contains package jdk8 (which the latest version is 2.42.0). So I assumed that I do not need the additional phantom-jdk8 module. Yet, after changing build.sbt to have just phantom-dsl in version 2.59.0 I got:

[error]           Cannot derive or find primitive implementation for class OffsetDateTime.
[error] Please create a Primitive manually using Primitive.iso or make sure
[error] the implicit Primitve for class OffsetDateTime is imported in the right scope.

On the official page you are still pointing out that to support JDK8 I need to use the phantom-jdk8 module https://outworkers.github.io/phantom/basics/primitives.html#jdk8-primitives

So, what's the current status of supporting JDK8 by Phantom DSL?

lukaszlenart commented 3 years ago

I noticed that you have changed the implicit for OffsetDateTime and now tuplePrimitive need to be manually provided, is this a right approach or bug?

  implicit def OffsetDateTimeIsPrimitive()(
    tuplePrimitive: Primitive[(Long, String)]
  ): Primitive[OffsetDateTime]