Fork me on GitHub

@arohner: do you have any examples how to use the result of parse-spec?


Has anyone come across a spec for Hiccup markup? I’m just getting started and not sure I’m up to trying to figure out if & how to express it.


at the moment I am copping out and using vector? 🙂


start from a tag, then attributes then how they relate to each other (and themselves). should be relatively easy


thanks Max but I’m in a hurry and not yet up to the nested spec stuff, if the answer is “no” that’s fine too


In clojure I can do (gen/generate (s/gen int?)) ;; => 1094 or (gen/generate (s/gen boolean?)) ;; => false. In clojurescript I can do (gen/generate (s/gen int?)) ;; => -308. But in clojurescript I can’t do (gen/generate (s/gen boolean?)) ;; => Error: Unable to construct gen at: [] for: function cljs$core$boolean_QMARK_(x){return (x === true) || (x === false);}]. What’s happening in clj vs cljs to make this difference?


Sounds like no one has written the generator for boolean? in cljs yet.


Are you on the very latest cljs version? If so, file a JIRA ticket.


I’m on 1.9.216.

Alex Miller (Clojure team)20:08:58

agreed, that should work


I see spec’ing of ns has hit master snapshot now @alexmiller ? My build just broke 🙂 This is a good thing — turns out we had (import …) in a test namespace instead of (:import …)


Oh, and a require instead of :require in another file...

Alex Miller (Clojure team)20:08:29

that’s definitely the most common kind of failure I found in ns in the wild

Alex Miller (Clojure team)20:08:10

there are a number of popular libraries that currently fail with the new specs - I’ve filed PRs on all the ones I found and they’ve all been merged, but afaik most do not yet have new released versions

Alex Miller (Clojure team)20:08:20

I’ll have some more guidance on some of this after we release an alpha


Wow, I’m running into more and more of those ns bugs!


Well, this is why we always do multi-version testing against master and our current selected release version!


We had a missing : in six files in all.

Alex Miller (Clojure team)21:08:26

well I found instances in both Clojure and ClojureScript too so you’re in good company :)