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

issues using intersperse in Scala 3 #146

Closed
wants to merge 1 commit into from

Conversation

philipschwarz
Copy link

@philipschwarz philipschwarz commented Jun 19, 2021

See here. Thanks @smarter for diagnosing.

@smarter
Copy link
Member

smarter commented Jun 19, 2021

The issue isn't specific to intersperse, https://github.com/scala/scala-collection-contrib/blob/main/src/main/scala/scala/collection/decorators/package.scala defines various defs with the same name as the corresponding class in the same package, they all need to be renamed.

@julienrf
Copy link
Collaborator

Could you elaborate on the reasons to not support this in Scala 3?

I don’t think we can do this change in collection-contrib without breaking the binary compatibility, right?

@smarter
Copy link
Member

smarter commented Jun 19, 2021

Could you elaborate on the reasons to not support this in Scala 3?

See scala/scala3#7650 / scala/scala3#7652

I don’t think we can do this change in collection-contrib without breaking the binary compatibility, right?

Yep.

@philipschwarz
Copy link
Author

philipschwarz commented Jun 20, 2021

FWIW, using Scalaz's intersperse is a workaround for what I was doing:

  def insertPaddingImage(images: List[List[Image]], paddingImage: Image): List[List[Image]] =
    import scalaz._, Scalaz._ // import scala.collection.decorators._
    images map (_ intersperse paddingImage) intersperse List(paddingImage)

@povder
Copy link
Contributor

povder commented Jan 6, 2022

I believe this can be closed in favor of #166

@SethTisue SethTisue closed this Jan 6, 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.

5 participants