Make JSValue be serializable

Description

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.

Details

Assignee

Reporter

Approval

Patch

Priority

Created July 10, 2018 at 4:17 PM
Updated February 25, 2022 at 4:50 PM