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

Make unified collection serialization opt-in instead of opt-out #7624

Merged
merged 1 commit into from
Feb 4, 2019

Conversation

szeiger
Copy link
Member

@szeiger szeiger commented Jan 10, 2019

@szeiger
Copy link
Member Author

szeiger commented Jan 24, 2019

Any takers? This looks big but it's really just factoring out Iterable.writeReplace() (and its overrides for the other standard collection kinds) into a DefaultSerializable trait.

@adriaanm
Copy link
Contributor

@SethTisue, could you look into this one?

}
new DefaultSerializationProxy(f, this)
}
}
Copy link
Contributor

@julienrf julienrf Jan 28, 2019

Choose a reason for hiding this comment

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

If I understand correctly, developers who want to implement a custom collection type can mix this trait to support the proxy-based serialization?

class MyCollection[A]
  extends Iterable[A]
    with IterableOps[A, MyCollection, MyCollection[A]]
    with DefaultSerializable { … }

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's what most of the collection classes are doing now (except from some wrapper classes like the Java/Scala converters which use the default serialization)

Copy link
Member

@SethTisue SethTisue left a comment

Choose a reason for hiding this comment

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

needs (trivial) rebase. after that, let's merge this.

@adriaanm
Copy link
Contributor

adriaanm commented Feb 4, 2019

rebased

@adriaanm adriaanm added the library:collections PRs involving changes to the standard collection library label Feb 4, 2019
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Feb 4, 2019
@SethTisue SethTisue merged commit c2747e8 into scala:2.13.x Feb 4, 2019
SethTisue added a commit to SethTisue/scala-xml that referenced this pull request Feb 4, 2019
sjrd added a commit to sjrd/scala-js that referenced this pull request Feb 7, 2019
xerial added a commit to xerial/airframe that referenced this pull request Mar 30, 2019
xerial added a commit to wvlet/airframe that referenced this pull request Mar 30, 2019
…-RC1 failure (#479)

* Add a workaround for classloader issues around sbt scala/scala#7624
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library:collections PRs involving changes to the standard collection library release-notes worth highlighting in next release notes
Projects
None yet
5 participants