If you have code like (let [#js [1] 3]), the JSValue is placed in the resulting compiler exception. Since JSValue is not serializable (it is just a plain deftype), this evidently causes an issue in environments expecting exceptions to be serializable (boot is evidently one).
Notes: Simply changing to defrecord causes unit tests to fail for some reason. Also, see CLJS-1898.
Environment
None
Attachments
1
Activity
Mike Fikes
May 12, 2019 at 2:34 AM
CLJS-2813.patch added to Patch Tender
Mike Fikes
July 11, 2018 at 3:45 PM
The problem with using defrecord for JSValue appears to be rooted in the need for some core functions that are not yet available when bootstrapping.
The attached patch takes a less aggressive approach and simply makes JSValue be Serializable, along with testing this aspect under Clojure.
If you have code like
(let [#js [1] 3])
, theJSValue
is placed in the resulting compiler exception. SinceJSValue
is not serializable (it is just a plaindeftype
), this evidently causes an issue in environments expecting exceptions to be serializable (boot
is evidently one).Notes: Simply changing to
defrecord
causes unit tests to fail for some reason. Also, see CLJS-1898.