This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-12
Channels
- # announcements (1)
- # architecture (112)
- # asami (22)
- # babashka (74)
- # beginners (189)
- # chlorine-clover (4)
- # cider (105)
- # clj-kondo (21)
- # clojure (45)
- # clojure-australia (1)
- # clojure-europe (26)
- # clojure-losangeles (4)
- # clojure-nl (3)
- # clojure-spec (5)
- # clojure-uk (8)
- # clojurescript (16)
- # conjure (1)
- # cursive (29)
- # datascript (21)
- # datomic (35)
- # events (1)
- # fulcro (12)
- # graalvm (3)
- # graphql (31)
- # kaocha (13)
- # malli (14)
- # meander (3)
- # mount (3)
- # off-topic (73)
- # pathom (9)
- # pedestal (5)
- # portal (2)
- # re-frame (4)
- # reagent (8)
- # reitit (3)
- # rum (1)
- # shadow-cljs (26)
- # spacemacs (3)
- # sql (6)
Hi, does anyone have advice for how to read the following error message from plumatic/schema? My understanding is that the arity doesn't conform to spec but where did the error occur? (`(demo/data.clj:77:1)` is simply where I defined the function)
Error refreshing environment: Syntax error macroexpanding clojure.core/defn at (demo/data.clj:77:1).
Call to clojure.core/defn did not conform to spec. clojure.lang.ExceptionInfo: Call to clojure.core/defn did not conform to spec. #:clojure.spec.alpha{:problems ({:path [:fn-tail :arity-1 :params], :pred clojure.core/vector?, :val :-, :via [:clojure.core.specs.alpha/defn-args :clojure.core.specs.alpha/params+body :clojure.core.specs.alpha/param-list :clojure.core.specs.alpha/param-list], :in [1]} {:path [:fn-tail :arity-n :bodies], :pred (clojure.core/fn [%] (clojure.core/or (clojure.core/nil? %) (clojure.core/sequential? %))), :val :-, :via [:clojure.core.specs.alpha/defn-args :clojure.core.specs.alpha/params+body :clojure.core.specs.alpha/params+body], :in [1]}), :spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x406684fa "clojure.spec.alpha$regex_spec_impl$reify__2509@406684fa"], :value (ticker->parsed-fname :- s/Str [ctx :- tsk/KeyMap ticker :- s/Str] (with-map-vals ctx [localdate-from localdate-to] (format "%s/%s-parsed.edn" (config/eod-historical-data-dir localdate-from localdate-to) ticker))), :args (ticker->parsed-fname :- s/Str [ctx :- tsk/KeyMap ticker :- s/Str] (with-map-vals ctx [localdate-from localdate-to] (format "%s/%s-parsed.edn" (config/eod-historical-data-dir localdate-from localdate-to) ticker)))}
Sounds like a defn
that has :-
instead of an argument vector. I'm guessing you used defn
(from core) with Schema syntax instead of Schema's own variant of defn
? @ronny463
(based on :pred clojure.core/vector?, :val :-
in the first line of the exception)