You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to the issues identified in #595, Our build needs a significant refactoring before we can further adopt Scala 3:
We currently have a hard dependency on project generic on all modules, both for testing and for documentation. Shapeless 3 is already available, but it's a completely different implementation and having both in the same generic project under different source folders would be considerably difficult to maintain (besides being confusing for users). On some projects we additionally use scalacheck-shapeless for testing, which obviously isn't available on Scala 3.0 either.
The mechanism for cross-compiling against different Scala versions has its limitations. We need to have a "main" scalaVersion to be used when we do e.g. compile and and additional crossScalaVersions when we do +compile. Right now, SBT doesn't allow us to have a Scala 3 only module (with scalaVersion := "3.0.0") because the main version in core is currently set to Scala 2.12. compile fails in that case, even though +compile or ++3.0.0 compile still works. Moreover, we cannot set projects with conditional subproject dependencies - we can't say "bundle depends on generic on Scala 2.x but not on 3.0" or "bundle depends on generic on Scala 2.x and on shapeless3 on 3.0" because dependsOn works at the project definition level, not as an SBT setting.
I think we need to work on 1) removing the special status of generic and shapeless as much as we possibly can and 2) try alternative approaches to handling different Scala versions. I've been exploring https://github.com/sbt/sbt-projectmatrix and opened a few issues there and I'll start by removing
scalacheck-shapeless and trying to create a shapeless3 version of generic.
The text was updated successfully, but these errors were encountered:
@ruippeixotog I would like to help out and contribute, is there anything I could do that would be helpful to work towards further Scala 3 compatibility?
In addition to the issues identified in #595, Our build needs a significant refactoring before we can further adopt Scala 3:
We currently have a hard dependency on project
generic
on all modules, both for testing and for documentation. Shapeless 3 is already available, but it's a completely different implementation and having both in the samegeneric
project under different source folders would be considerably difficult to maintain (besides being confusing for users). On some projects we additionally use scalacheck-shapeless for testing, which obviously isn't available on Scala 3.0 either.The mechanism for cross-compiling against different Scala versions has its limitations. We need to have a "main"
scalaVersion
to be used when we do e.g.compile
and and additionalcrossScalaVersions
when we do+compile
. Right now, SBT doesn't allow us to have a Scala 3 only module (withscalaVersion := "3.0.0"
) because the main version incore
is currently set to Scala 2.12.compile
fails in that case, even though+compile
or++3.0.0 compile
still works. Moreover, we cannot set projects with conditional subproject dependencies - we can't say "bundle depends on generic on Scala 2.x but not on 3.0" or "bundle depends on generic on Scala 2.x and on shapeless3 on 3.0" becausedependsOn
works at the project definition level, not as an SBT setting.I think we need to work on 1) removing the special status of
generic
and shapeless as much as we possibly can and 2) try alternative approaches to handling different Scala versions. I've been exploring https://github.com/sbt/sbt-projectmatrix and opened a few issues there and I'll start by removingscalacheck-shapeless and trying to create a shapeless3 version of
generic
.The text was updated successfully, but these errors were encountered: