(Please note that this project has been moved to https://github.com/scala/pickling.)
This project aims to turn a custom build of macro paradise that we used in Object-Oriented Pickler Combinators and an Extensible Generation Framework into a standalone library that targets 2.10.x (more precisely, the library will require 2.10.2+, since it's when implicit macros, a key ingredient to our technique, have been fixed).
Since we are making extensive use of quasiquotes, which cannot be added to 2.10.x due to binary and source compatibility restrictions, building (but not using!) scala-pickling-210x requires a custom build of scalac, as explained in comments to Build.scala. Please note that scala-pickling-210x can be used without any problems with vanilla scalac 2.10.2 - custom scalac is only necessary to build this library, not to compile against it or to link to it at runtime.
Known limitations:
- No support for
@pickleable
, since we cannot have macro annotations in 2.10.x. - In the public API (and everywhere else), vanilla type tags are replaced with
scala.pickling.FastTypeTag/scala.pickling.fastTypeTag
. - Picklers are generated directly at call sites, since we cannot have introduceTopLevel in 2.10.x.
- No runtime compilation, since it's not obvious how to package it without inducing a dependency on
scala-compiler.jar
. - No classpath scans, because they don't work.