fsist / safepickle

Deliberately restricted pickling library for Scala
Apache License 2.0
15 stars 4 forks source link

scala.js support? #10

Open ngbinh opened 9 years ago

ngbinh commented 9 years ago

Scala.js http://www.scala-js.org/ is picking up a lot of steams from scala devs at the moment. I am wondering if there is a plan to support it in the near future?

danarmak commented 9 years ago

I'm afraid I have no such plans at the moment, although PRs would of course be welcome.

I haven't used scala-js myself, but I do know the main obstacle is the use of runtime reflection for #5 (here) as a workaround to get default parameter values. I don't know how to get these values from a macro, because the companion object's methods returning these default values are generated by the compiler after macros are run, so any attempt by the macro to generate a reference to them fails to compile.

Other than that, the code hopefully should just work, but would require two more simple additions: a native scala-js json backend, and a scala-js build definition (using sbt and not gradle).