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

Warning when asking for implicit picklers/unpicklers #397

Open
jvican opened this issue Apr 3, 2016 · 2 comments
Open

Warning when asking for implicit picklers/unpicklers #397

jvican opened this issue Apr 3, 2016 · 2 comments

Comments

@jvican
Copy link
Member

jvican commented Apr 3, 2016

implicitly[Pickler[(Int, List[String])]]

The above code snippet produces this beauty:

[warn] /data/rw/code/scala/spores/spores-pickling/src/test/scala/scala/spores/run/pickling/PicklingBinary.scala:58: method lookupPicklee in package internal is deprecated: Use currentRuntime.refRegistry.pickle.registerPicklee instead
[warn]       implicit val p = implicitly[Pickler[(Int, List[String])]]
[warn]

Why are you relying on registerPicklee? Why not picklers.genPickler? Isn't that part of refRegistry and therefore it's related to the bookkeeping of circular references? Why do you need that for a simple pickler/unpickler of a tuple?

This only affects scala pickling v0.11.x.

@jvican
Copy link
Member Author

jvican commented Apr 8, 2016

Most of the warnings have disappeared with #400 but some of them persist.

@jsuereth
Copy link
Contributor

This is actually a warning about "sharing". registerPicklee is used to determine if we have a cycle in the pickle-object-graph. It actually has nothing to do with runtime pickler generation (or genPickler).

It's most liekly due to some stale code in sourcegen.scala or elsewhere.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants