Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship with com.cognitect/transit-js supporting meta serialization #1009

Closed
mfikes opened this issue Sep 8, 2019 · 3 comments · Fixed by #1010
Closed

Ship with com.cognitect/transit-js supporting meta serialization #1009

mfikes opened this issue Sep 8, 2019 · 3 comments · Fixed by #1010
Assignees

Comments

@mfikes
Copy link
Member

mfikes commented Sep 8, 2019

ClojureScript 1.10.520
cljs.user=> (require '[cognitect.transit :as t])
nil
cljs.user=> (defn roundtrip [x]
       #_=>   (let [w (t/writer :json
       #_=>            {:transform t/write-meta})
       #_=>         r (t/reader :json)]
       #_=>             (t/read r (t/write w x))))
#'cljs.user/roundtrip
cljs.user=> (meta (roundtrip ^:foo []))
nil
@mfikes mfikes self-assigned this Sep 8, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Sep 8, 2019

This might be a stupid question but is the implication of this that transit-js does support this but that transit-cljs doesn't (and so Planck should switch)?

@mfikes
Copy link
Member Author

mfikes commented Sep 8, 2019

@pyrmont transit-cljs supports serializing meta (cognitect/transit-cljs@35663b3) and transit-js also has the underlying support (cognitect/transit-js@91f55cf).

The only issue is that you need at least transit-js v0.8.859, while if you use transit-cljs v0.8.256, you only appear to get an older copy:

$ clj -Srepro -Sdeps '{:deps {com.cognitect/transit-cljs {:mvn/version "0.8.256"}}}' -Stree
org.clojure/clojure 1.10.1
  org.clojure/spec.alpha 0.2.176
  org.clojure/core.specs.alpha 0.2.44
com.cognitect/transit-cljs 0.8.256
  com.cognitect/transit-js 0.8.846

This is due to this commit only being on master, after the release: cognitect/transit-cljs@b5a67e7

@pyrmont
Copy link
Contributor

pyrmont commented Sep 8, 2019

@mfikes Ahhhh, got it. Thanks :)

mfikes added a commit that referenced this issue Sep 8, 2019
* Ship with com.cognitect/transit-js supporting meta serialization

Fixes #1009

* Turn off checked arrays in Travis builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants