Skip to content

Conversation

@mpilquist
Copy link
Member

@mpilquist mpilquist commented Jan 3, 2020

.to was overloaded -- one took the Collector and the other took an implicit factory. When the target type was known, the 2.12 compiler was picking the factory overload. To fix, I removed the old overload -- or rather, made it private[Stream] so that it cannot be called but it stays around for binary compatibility reasons.

Note that in practice, any s.compile.to[C] can be written as s.compile.to(C) b/c Collector can be implicitly instantiated from any Factory. Only case where that's not true is when C doesn't implement Factory directly and instead, there's some implicit factory in scope.

* Applies the given sink to this stream.
*/
@deprecated("Use .through instead", "1.0.2")
private[fs2] def to[F2[x] >: F[x]](f: Stream[F, O] => Stream[F2, Unit]): Stream[F2, Unit] =
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the reason for the mima exclusion. Not related to #1709 but noticed we can remove this safely now.

Copy link

@pauljamescleary pauljamescleary left a comment

Choose a reason for hiding this comment

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

Looks like Collector and Balance may have some scaladoc that uses the .to[A] syntax.

@mpilquist mpilquist merged commit 0a9cc37 into typelevel:master Jan 4, 2020
@mpilquist mpilquist added this to the 2.2.0 milestone Jan 18, 2020
@mpilquist mpilquist deleted the bugfix/1709 branch February 18, 2020 12:56
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.

2 participants