Fork me on GitHub
#clojure-spec
<
2018-02-03
>
misha09:02:14

@alexmiller is there any estimate on where will this be addressed? It makes generating even slightly complex data structures noticeably painful. https://dev.clojure.org/jira/browse/CLJ-2079 (Generator overrides for spec aliases are not respected)

benalbrecht12:02:12

@misha @ghadi you could resolve the spec manually before passing it to the generator map:

(defn resolve-spec [spec] 
(last (take-while keyword? (iterate s/get-spec spec))))

misha13:02:32

do you mean "find all aliases manually and explicitly override those"?

misha13:02:46

that should work, yes