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

Scala pickling fails to generate picklers/unpickers for case classes that receive implicit parameters #399

Open
jvican opened this issue Apr 6, 2016 · 0 comments
Labels
Milestone

Comments

@jvican
Copy link
Member

jvican commented Apr 6, 2016

I have a case class defined like this:

case class B[T: Pickler: Unpickler](v: T) {
  def getPickler = B.mkPickler[T]
  def getUnpickler = B.mkUnpickler[T]
}

I need to have a reference to those picklers/unpicklers because there are some call sites that don't know the type parameter and they need to be still able to pickle/unpickle.

Scala pickling gives this error:

- Encountered a case class (fp.model.Transformed) where we could not find all the constructor parameters. This may be because some fields are marked transient.

I'd propose to ignore completely implicits that are caught by any picklable entity by default. Therefore, they won't be pickled/unpickled, which I think it's fine because conceptually implicits are not meant for that goal.

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

No branches or pull requests

2 participants