As an aside: The motivating scenario where this arose is that the ClojureScript compiler serializes out, under the key :cljs.spec/registry-ref a sequence of map entries, into its analysis cache. This works fine for for the Clojure-implementation of ClojureScript when it uses transit-clj, but the same use fails if you attempt to do the same with self-hosted ClojureScript, using transit-cljs.
transit-clj
supports writing map entries (as 2-element vectors). Here is an example:But,
transit-cljs
doesn't support this. Here is an example, illustrating attempting to acljs.core/BlackNode
and acljs.core/MapEntry
:As an aside: The motivating scenario where this arose is that the ClojureScript compiler serializes out, under the key
:cljs.spec/registry-ref
a sequence of map entries, into its analysis cache. This works fine for for the Clojure-implementation of ClojureScript when it usestransit-clj
, but the same use fails if you attempt to do the same with self-hosted ClojureScript, usingtransit-cljs
.