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
Add Dotty support for FS2 2.x #1973
Conversation
@@ -228,8 +229,8 @@ class CompressionSuite extends Fs2Suite { | |||
test("deflate and inflate are reusable") { | |||
val bytesIn: Int = 1024 * 1024 | |||
val chunkSize = 1024 | |||
val deflater = deflate[IO](bufferSize = chunkSize) | |||
val inflater = inflate[IO](bufferSize = chunkSize) | |||
val deflater = deflate[IO](DeflateParams(bufferSize = chunkSize)) |
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.
The other overload is not callable from Dotty -- appears to be a bug with overloads & default parameters, but I haven't minimized it yet.
I'm going to eagerly merge this one but feel free to provide review comments and I'll happily address. |
Why did so many case classes lose final? Are all case classes final in dotty? |
@johnynek case objects are final in dotty -- compiler complains otherwise. Case classes can still be marked final though: scala> final case object One
1 |final case object One
|^^^^^
|final modifier is redundant for objects |
This PR backports Dotty support to FS2 2.x. Most of the changes are mechanical based on the develop branch, though a handful needed different workarounds. In particular:
debug
anddebugChunks
toInvariantOps
, which would be a binary incompatible, we use@uncheckedVariance
parJoin
andparJoinUnbounded
get theirF2[_] <:< F[_]
param changed toF2[Any] <:< F[Any]
(whereas on develop branch, they get moved toInvariantOps
)text.base64
object to work around Dotty overloading issues