Ahh, thanks for the heads up! This is the minimal failing example I could come up with extracted from a larger spec. In the original spec both ::a and ::b contain several other keys with with simple predicates like string?, pos-int? etc. FWIW, adding some additional keys like this to ::a and ::b in the example still results the same error.
On Monday, January 2, 2017 at 5:12:27 AM UTC+1, Alex Miller wrote: > > FYI, s/fdef takes a qualified symbol, not a keyword, and it should refer > to a function of the same qualified name. But you could do this instead to > address that: > > (s/def ::a-fn > (s/fspec > :args (s/cat :arg ::a) > :ret ::a)) > > How could this even generate anything? That is, what would you expect it > to generate? There's no spec here that says anything about how to actually > create a concrete piece of data (there are no preds!). Because the maps are > using required keys, it has to try to create them. > > > On Sunday, January 1, 2017 at 9:04:20 PM UTC-6, John Schmidt wrote: >> >> I just ran in to a similar issue: >> >> ----------------------------- >> >> (require '[clojure.spec :as s]) >> >> (s/def ::a (s/keys :req [::b])) >> >> (s/fdef ::a-fn >> :args (s/cat :arg ::a) >> :ret ::a) >> >> (s/def ::b (s/keys :req [::a-fn])) >> >> ;; All of these fail even with s/*recursion-limit* bound to 1. >> >> (s/exercise ::a) ;; StackOverflowError >> clojure.test.check.rose-tree/pure (rose_tree.cljc:-1) >> (s/exercise ::b) ;; StackOverflowError >> clojure.lang.Numbers$LongOps.isPos (Numbers.java:447) >> (s/exercise ::a-fn) ;; StackOverflowError >> clojure.lang.AFn.applyToHelper (AFn.java:148) >> >> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.