This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-05
Channels
- # admin-announcements (3)
- # architecture (1)
- # beginners (16)
- # boot (14)
- # cljsrn (205)
- # clojars (4)
- # clojure (100)
- # clojure-austin (2)
- # clojure-india (1)
- # clojure-poland (7)
- # clojure-russia (95)
- # clojure-spec (25)
- # clojure-uk (127)
- # clojurescript (32)
- # core-async (7)
- # cursive (2)
- # datascript (4)
- # datomic (3)
- # editors-rus (1)
- # emacs (8)
- # events (10)
- # funcool (5)
- # gorilla (2)
- # hoplon (6)
- # jobs (1)
- # lein-figwheel (7)
- # leiningen (2)
- # luminus (11)
- # om (7)
- # onyx (119)
- # other-languages (31)
- # proto-repl (1)
- # proton (37)
- # protorepl (3)
- # re-frame (60)
- # reagent (8)
- # spacemacs (9)
- # specter (21)
- # spirituality-ethics (2)
- # yada (10)
@gfredericks: You saw the PR I put up for schpec a few days ago, right? I’d like to contribute all 3 things I have tickets open for, but I’d prefer to do them sequentially for minimal git exposure
@lvh yep, I just didn't have any free time the last week; I think this weekend is promising
I can probably turn them into a proper release
Hey, would it be considered bad practice to put spec/def
inside a top-level let?
alright... thx
Just curious … what would you be defining in the let that the spec would need? I can see maybe putting it in a letfn if you needed a particularly hairy :fn
and wanted to compose it from smaller pieces …
(s/def ::something (letfn [(yourpred? [x[ ...) (yourgen? [] ...)] (s/spec yourpred? :gen yourgen?))
is nice also for the explain
I’ve been using that pattern like it’s going out of style for my specs of e.g. maps with dependent values
Has anyone been able to articulate a reason for or work around the MultiFn errors that often occur when running stest/check
?
E.g.
CompilerException java.lang.ClassCastException: cider.nrepl.middleware.test$report cannot be cast to clojure.lang.MultiFn, compiling:(clojure/test/check/clojure_test.cljc:95:1)
@donaldball: yes, you just have to explicitly require clojure.test.check.clojure-test
Awesome, thanks
Alas, I still get that exception
@donaldball: see TCHECK-113
@donaldball I think I added the lein workaround as a comment there to turn off clojure.test monkeypatching
FWIW the lein workaround is sufficient to get lein test
to not barf, but I needed to explicitly require clojure.test.check.clojure-test
in my test namespaces for the check to work in my cider repl
¯\(ツ)/¯
I'll take this as more evidence that a test.check release would be helpful