Fork me on GitHub
#clojure-spec
<
2019-05-30
>
hlolli10:05:52

So I have this fdef

(s/fdef define-fx
  [env]
  :args (s/cat :fx-name ::fx-name
               (s/keys* :req [::fx-name]
                        :req-un [(or ::orc-string ::orc-filepath ::orc-internal-filepath)]
                        :opt [::fx-form ::ctl-instr ::num-outs
                              ::init-hook ::release-hook
                              ::release-time ::config]))
  :ret :instrument-controller fn?)
for this macro
(defmacro define-fx   [fx-name & {:keys [orc-string fx-form ctl-instr num-outs release-time
                     init-hook release-hook instance-config] :as env}] )
but there seems to be no instrumentation if I forget to provide required args, or type them incorrectly? Any obvious error here?

drone16:05:48

there’s no key for the second key-pred pair in s/cat

drone17:05:09

and [env] seems wrong should be removed, unless there’s some form of fdef I’m unfamiliar with

hlolli16:06:00

yup that's right, works now, thanks!