zio-sql
zio-sql copied to clipboard
Fix Dotty compilation errors
There are several compilation errors while using Dotty. Once they're fixed we'll be able to include Scala 3 check in build and Scala 3 release. To compile with Dotty run:
sbt "++ 0.27.0-RC1" compile
I made an attempt at this, but it probably requires a lot more knowledge about the inner workings of both dotty and zio-sql to make everything works. Basically the library code compiles, but I had to refactor the Schema, and I was not able to make Examples.scala compile:
https://github.com/zio/zio-sql/pull/291
Are there any updates on this? Seems like pretty useful
Hi, I was following along with the readme, in a gradle project using scala3, and was hit with
Scala 2 macro cannot be used in Dotty.
when doing
implicit val productSchema = DeriveSchema.gen[Product]
But, the readme intro says:
No magic. ZIO SQL does not need any macros or plug-ins to operate (everything is a value!), and it works across both Scala 2.x and Scala 3. Optionally, Scala schema can be created from database schemas.
So I'm not sure if I'm missing something, or things aren't quite yet running against scala3?
hello @softwareCobbler . Over time we introduced some macros to ZIO SQL mostly because we wanted to get much better error messages from the compiler. However that made scala 3 release much more complicated as macros need to be rewritten completely. This work is still in progress. I will also change readme to be more up to date. Thanks for pointing this out.