Fix bincompat of PartiallyAppliedFromIterator on Scala 2.12#2940
Merged
mpilquist merged 4 commits intotypelevel:mainfrom Jul 8, 2022
Merged
Fix bincompat of PartiallyAppliedFromIterator on Scala 2.12#2940mpilquist merged 4 commits intotypelevel:mainfrom
PartiallyAppliedFromIterator on Scala 2.12#2940mpilquist merged 4 commits intotypelevel:mainfrom
Conversation
armanbilge
commented
Jul 8, 2022
| new PartiallyAppliedFromEither(dummy = true) | ||
|
|
||
| private[fs2] final class PartiallyAppliedFromIterator[F[_]]( | ||
| final class PartiallyAppliedFromIterator[F[_]]( |
Member
Author
There was a problem hiding this comment.
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) | ||
| } |
Member
Author
There was a problem hiding this comment.
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.
Member
Author
|
Bla, this became a bit messy 😕 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2939.
This was my fault due to changes in #2933.
Inline comments below.