defrecord does not emit IKVReduce protocol

Description

Records are maps and in Clojure they support reduce-kv (IKVReduce protocol).
This is not true in ClojureScript:

Fails wit Error: No protocol method IKVReduce.-kv-reduce defined for type : [object Object]

Environment

None

Activity

Show:
Tommi Tommi
September 24, 2018, 4:12 PM

Hi. What's the current status of this? Spec-tools fails to generate the JSON Schemas out of clojure.spec + records on cljs and there is a local fix proposed on that side: https://github.com/metosin/spec-tools/pull/130/files

Mike Fikes
September 25, 2018, 1:09 AM

Hey Samuel, can you re-baseline your attached patch? (It no longer applies on master.)

Erik Assum
September 28, 2018, 5:35 AM

I've created a new patch based on Samuels and kept the attribution.

Mike Fikes
September 28, 2018, 7:30 AM

0001-CLJS-1297-defrecord-does-not-emit-IKVReduce-protocol.patch applies cleanly, passes CI and Canary.

David Nolen
October 28, 2018, 2:31 AM
Completed

Assignee

David Nolen

Reporter

Daniel Skarda

Labels

Approval

None

Patch

Code and Test

Fix versions

Affects versions

Priority

Critical