Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Add selfdescribing test #407

Closed
wants to merge 1 commit into from
Closed

Conversation

jvican
Copy link
Member

@jvican jvican commented Apr 13, 2016

This test shows a typical concrete use case to instantiate a static
pickler from the class name of the unpickler that is serialized along
the other information of the pickled instance, so that someone can
unpickle this message even if it doesn't know anything about the entity
it has to unpickle.

This test shows a typical concrete use case to instantiate a static
pickler from the class name of the unpickler that is serialized along
the other information of the pickled instance, so that someone can
unpickle this message even if it doesn't know anything about the entity
it has to unpickle.
abstract class SDPicklingLogic extends Ops with AllPicklers with BinaryFormats

object SDPicklingProtocol extends {
val ignoreMe = scala.pickling.internal.replaceRuntime(new HybridRuntime)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is problematic, since it makes several other tests break. It appears that it is not necessary anyway for this test.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is really necessary that HybridRuntime is enabled, otherwise it will use runtime reflection to unpickle.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, yeah, you'll have to create anew project to run tests off of. Make the new project depend on "core" and It can have this new protocol.

The issue is, runtime is a "global" so while you can replace it, we'll need different JVMs to test the various runtime options.

It'd be good to have a hybrid test-project anyway, so if you need, I can create it.

Copy link
Member Author

Choose a reason for hiding this comment

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

No problem @jsuereth, I'll take over it, thanks 👍

@jvican jvican closed this May 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants