Skip to content
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

Fix bincompat of PartiallyAppliedFromIterator on Scala 2.12 #2940

Merged
merged 4 commits into from
Jul 8, 2022

Conversation

armanbilge
Copy link
Member

Fixes #2939.

This was my fault due to changes in #2933.

Inline comments below.

private[fs2] final class PartiallyAppliedFromIterator[F[_]](
final class PartiallyAppliedFromIterator[F[_]](
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this class was package-private, so we received no bincompat support from MiMa. Indeed, the fact that this works at all seems like a manifestation of scala/bug#6794.

Comment on lines 3321 to 3330
object PartiallyAppliedFromIterator {
@deprecated("bincompat", "3.2.10")
private[fs2] def `apply$extension`[F[_], A](
dummy: Boolean,
iterator: Iterator[A],
chunkSize: Int,
F: Sync[F]
): Stream[F, A] =
new PartiallyAppliedFromIterator(dummy).apply(iterator, chunkSize)(F)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Scala 2.12, adding an overload of a method defined on an AnyVal causes the the binary name of the original method to change, breaking bincompat. Fortunately, we can restore a method with the same signature manually.

@armanbilge
Copy link
Member Author

Bla, this became a bit messy 😕

@mpilquist mpilquist merged commit cb507e6 into typelevel:main Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible binary compability problem on fs2-3.2.9 on Scala 2.12
2 participants