You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On upgrading to integrant 0.13 (from 0.8), following the documentation, it suggests replace prep-key with expand-key. But they behave very differently on relation to types defined as records (because probably records behaves like a map and how expand-key performs a deep merge).
Having the following on the user ns:
(defmethodig/expand-key::foobar
[k v]
{k (assoc v :uri (map->UriLike {:schema"https":host"hello.world":path"/echo"}))})
(defmethodig/prep-key::foobar
[_ v]
(assoc v :uri (map->UriLike {:schema"https":host"hello.world":path"/echo"})))
It is very unexpected from my point of view that a record data structure type is converted to a plain map when i use the expand mechanism suggested as replacement to the deprecated prep-key.
Is this expected behavior of expand or is a bug? With the current behavior of expand it can't be used as replacement because it has very different behavior and it has really a very purpose from my point of view.
The text was updated successfully, but these errors were encountered:
Hello,
On upgrading to integrant 0.13 (from 0.8), following the documentation, it suggests replace prep-key with expand-key. But they behave very differently on relation to types defined as records (because probably records behaves like a map and how expand-key performs a deep merge).
Having the following on the user ns:
I get the following:
It is very unexpected from my point of view that a record data structure type is converted to a plain map when i use the expand mechanism suggested as replacement to the deprecated prep-key.
Is this expected behavior of expand or is a bug? With the current behavior of expand it can't be used as replacement because it has very different behavior and it has really a very purpose from my point of view.
The text was updated successfully, but these errors were encountered: