This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-19
Channels
- # aws-lambda (4)
- # beginners (62)
- # cider (20)
- # cljs-dev (9)
- # cljsrn (13)
- # clojars (3)
- # clojure (105)
- # clojure-brasil (1)
- # clojure-denver (1)
- # clojure-finland (4)
- # clojure-italy (23)
- # clojure-norway (1)
- # clojure-spec (6)
- # clojure-uk (56)
- # clojurescript (41)
- # cursive (10)
- # datomic (25)
- # emacs (23)
- # figwheel (2)
- # fulcro (133)
- # graphql (12)
- # hoplon (32)
- # instaparse (13)
- # keechma (1)
- # lein-figwheel (1)
- # luminus (1)
- # lumo (1)
- # nyc (2)
- # off-topic (34)
- # om (2)
- # onyx (10)
- # pedestal (8)
- # portkey (1)
- # re-frame (10)
- # reagent (26)
- # ring (8)
- # shadow-cljs (77)
- # spacemacs (4)
- # sql (8)
- # tools-deps (15)
- # vim (9)
Is there an easy way to modify an existing s/keys
spec?
I often find myself needing to take an existing spec and update a few keys. It’d be nice if I could just replace a key instead of copying everything.
Maybe s/merge
would work for you @xiongtx? I'm not quite sure how it handles merging over existing keys tho'
Is it possible to instrument initial function calls? i.e. I have my dev namespace where I enable instrumentation:
(ns dev.user
(:require
[clojure.spec.test.alpha :as st]
[my-project.util]))
(st/instrument)
But by the time I load my dev.user
namespace, I have already ran some functions:
(ns my-project.util
(:require
[clojure.spec.alpha :as s]))
(defn reg-event
[id]
;; do side effecting stuff
nil)
(s/fdef reg-event
:args (s/cat :id keyword?)
:ret nil?)
(reg-event "my-event")
The call to reg-event
is not instrumented at this point so I do not get a instrumentation error that my call to reg-event
is incorrect.