-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala 3 support #109
Scala 3 support #109
Conversation
Addressed some of the issues listed in the description in cleanup commits. |
Can your run Thanks |
Added formatting fixes. Didn't pay attention to empty lines in the original changeset. |
The build for Scala 3 complains that:
So on build.sbt: |
Reproduced the error with scalac and jdk 1.8. Looks like an issue how scalac uses |
Reported in dotty issues scala/scala3#13810 |
@toxicafunk we have some options:
I will experiment with 2. for the moment. |
Remove it and push it so I can merge it. Then I can maybe help with 1 or 2 until something happens on 4. Thanks |
scalacOptions ++= | ||
(CrossVersion.partialVersion(scalaVersion.value) match { | ||
case Some((3, _)) => | ||
Seq() // Seq("-release:8") has issue running with JDK8 https://github.com/lampepfl/dotty/issues/13810 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scala 3 still supports -Xtarget 8
, which should work with any JDK. It's an equivalent of Scala 2' -target jvm-1.8
and both these options make the compiler produce bytecode for JDK 8. The difference is that only -release
checks whether you don't use any elements of JDK's API that are absent from the specified version
Fixes #107
I bumped some (probably too many) libraries, what looked reasonable to do. I also applied some Scala3 options, which I used in other projects, but I'm not saying that it is perfect and could be changed if needed.
Also replaced silencer with a combination of
@nowarn
+ compiler setting forScala213
to silence no-suppress.Removed Numeric Semigroup as it looked unused I didn't want to write Scala3 version of it.
Changed recursive
setToTime
in gauge to implementation used by gauge child, because Scala3 was blaming the code for infinite recursion and I could not understand the reason why it was written this way.Had to create Scala3 specific version of Show, because otherwise it failed to discover needed implicits. Now it is a bit ugly because Scala212 and Scala213 are just the same code copied.
Adjusted ci matrix to what looks like logical change, but I have no idea if this really works.
DropwizardExtractor Scala3 version is a copy of Scala213 with minor fix for Type discovery collision under the new compiler.
There is also an ugly hack around scala binary version detection as it doesn't seem to work for Scala3, so, first we check scala version and then scala binary version.