Make JSValue be serializable
Description
Environment
None
Attachments
1
- 11 Jul 2018, 03:45 PM
Activity
Show:
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.
Details
Details
Assignee
Mike Fikes
Mike FikesReporter
Mike Fikes
Mike FikesApproval
Accepted
Patch
Code and Test
Priority
Created July 10, 2018 at 4:17 PM
Updated February 25, 2022 at 4:50 PM
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.