This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-14
Channels
- # announcements (2)
- # babashka (27)
- # beginners (20)
- # biff (1)
- # cljs-dev (2)
- # clojars (19)
- # clojure (50)
- # clojure-austin (10)
- # clojure-australia (8)
- # clojure-europe (23)
- # clojure-losangeles (1)
- # clojure-nl (1)
- # clojure-spec (7)
- # clojured (7)
- # clojurescript (19)
- # cursive (4)
- # datalevin (9)
- # datomic (15)
- # emacs (7)
- # fulcro (25)
- # gratitude (2)
- # helix (1)
- # holy-lambda (2)
- # hyperfiddle (14)
- # introduce-yourself (1)
- # jobs (5)
- # joyride (2)
- # juxt (3)
- # kaocha (9)
- # leiningen (14)
- # meander (9)
- # minecraft (34)
- # nbb (18)
- # off-topic (15)
- # polylith (12)
- # re-frame (4)
- # remote-jobs (1)
- # shadow-cljs (79)
- # vim (57)
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
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
👍 2