I don't understand what spec is trying to tell me here. Isn't {:keys ... valid clojure?
-- Spec failed --------------------
(... ... [{:keys [http-client max-retries backoff retry?], :as client} ...] ...)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
should satisfy
vector?
-- Relevant specs -------
:clojure.core.specs.alpha/arg-list:
.... (more spec info...)I don't understand either, but you can try to use this lib to get better spec messages: https://github.com/bhb/expound
that is expound formatted ๐
Do you have the message without expound?
Throwing in a guess: maybe you forgot to put optional arguments in a vector? (defn blabla [a b & {:keys [c d]}] ,,,)
i could go back and re-create the errors it if it helps. The minimal change that made the errors go away was to
(defn foo [{:keys [x] :or {::x "x"}] x)
to
(defn foo [{:keys [x] :or {x "x"}] x)
note the :or {::x to to just x. that is, the value of the hashmap of the :or arg has to be a symbol not a key.
This same error seemed to generate several different expound messages (at least thats how it seems to me).the keys of :or are always the symbols being bound, which must be unqualified, so neither :x or ::x are valid in that spot