codingwell / scala-guice

Scala extensions for Google Guice
Apache License 2.0
341 stars 44 forks source link

Scala 3? #97

Closed tsuckow closed 1 year ago

tsuckow commented 3 years ago

https://www.scala-lang.org/blog/2021/05/14/scala3-is-here.html

cacoco commented 3 years ago

@tsuckow FWIW, the latest Scala 2.13.x (2.13.6) release is compatible with Scala 3 and meant to make the transition to Scala 3 easier. We recently moved to support Scala 2.13.6 because of this.

Also, out of curiosity, it looks like scala-guice still supports Scala 2.11 -- what are the plans (if any) to drop support there as that may make things more complicated to prepare for Scala 3?

tsuckow commented 3 years ago

At this point I would consider 2.11 support expendable. I just haven't had anything come up that breaks it.

My initial glances seemed to indicate compiling for Scala 3 would require breaking changes. At which point dropping 2.x is unavoidable anyway.

cacoco commented 3 years ago

@tsuckow added support for 2.13.6 in #98. Please take a look.

tsuckow commented 2 years ago

2.13.6 seems to get us closer but unfortunately it seems the biggest hurdle is the lack of TypeTags in 3. Attempting to use the 2.13 version of the reflection library would pull in the 2.13 scala library jar which from what I've read is a no-no. (Doesn't work anyway you get an error: "No TypeTag available for Nothing")

image

It seems it would probably require a macroized version of TypeConversions, assuming that is even possible.

Edit: This is in regards to making a native 3.0 library. I have not tested using the 2.13 version of scala-guice in 3.0.

tsuckow commented 1 year ago

5.1.1 should sync to maven central shortly

tsuckow commented 1 year ago

image image image image