Open thiagocarvp opened 6 months ago
I'm trying to use the xform argument on the proto-map->clj-map function to handle proto-maps that have fields using one-of.
xform
proto-map->clj-map
one-of
However, the xform is being applied after the default mapper, so it cannot access the proto-map. Is this order supposed to be this way? https://github.com/AppsFlyer/pronto/blob/df3f76fa1a58727e07f11a5eb74a2066f637ff90/src/clj/pronto/core.clj#L122
If the xform is meant to be the first transducer, it should be:
(comp xform mapper)
Reference from Clojure docs: https://clojure.org/reference/transducers#_defining_transformations_with_transducers
I'm trying to use the
xform
argument on theproto-map->clj-map
function to handle proto-maps that have fields usingone-of
.However, the
xform
is being applied after the default mapper, so it cannot access the proto-map. Is this order supposed to be this way? https://github.com/AppsFlyer/pronto/blob/df3f76fa1a58727e07f11a5eb74a2066f637ff90/src/clj/pronto/core.clj#L122If the
xform
is meant to be the first transducer, it should be:Reference from Clojure docs: https://clojure.org/reference/transducers#_defining_transformations_with_transducers