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

‘rollup-transpose’ always fails in args spec #15

Open
glts opened this issue Apr 25, 2018 · 0 comments · May be fixed by #23
Open

‘rollup-transpose’ always fails in args spec #15

glts opened this issue Apr 25, 2018 · 0 comments · May be fixed by #23

Comments

@glts
Copy link

glts commented Apr 25, 2018

huri.core/rollup-transpose cannot be used because its arguments spec
is impossible to satisfy.

In rollup-transpose, the argument f has the spec (s/and ::summary-fn map?). However, here ::summary-fn never conforms to a
map and so the predicate is impossible to satisfy. Because
rollup-transpose is instrumented, it cannot be used without explicit
unstrumenting beforehand.

(->> [{:x 1, :y 5} {:x 2, :y 4} {:x 1, :y 3}]
     (rollup-transpose :x {:y-sum [sum :y]}))
; => ExceptionInfo Call to #'huri.core/rollup-transpose did not conform to spec ...

(stest/unstrument 'huri.core/rollup-transpose)
(->> [{:x 1, :y 5} {:x 2, :y 4} {:x 1, :y 3}]
     (rollup-transpose :x {:y-sum [sum :y]}))
; => {:y-sum {1 8, 2 4}}

This is with Clojure 1.9.

@glts glts linked a pull request May 20, 2018 that will close this issue
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.

1 participant