This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-11
Channels
- # babashka (3)
- # beginners (70)
- # calva (15)
- # cider (34)
- # clara (10)
- # cljsrn (2)
- # clojure (28)
- # clojure-europe (21)
- # clojure-france (1)
- # clojure-uk (17)
- # clojuredesign-podcast (4)
- # clojurescript (51)
- # cursive (21)
- # data-science (1)
- # datalog (2)
- # datascript (2)
- # datomic (10)
- # emacs (5)
- # esprit (24)
- # expound (9)
- # figwheel-main (15)
- # fulcro (31)
- # graphql (3)
- # jobs-discuss (27)
- # keechma (2)
- # luminus (2)
- # malli (2)
- # minimallist (14)
- # nrepl (1)
- # off-topic (4)
- # pathom (1)
- # pedestal (8)
- # re-frame (10)
- # reagent (5)
- # reitit (2)
- # rewrite-clj (54)
- # sci (1)
- # shadow-cljs (34)
- # spacemacs (12)
- # sql (17)
- # vim (16)
- # web-security (1)
Afternoon, I just ran into an issue using the latest versions of orchestra and expound together and wondered if anyone could help. I’ve added orchestra using
(stest/instrument)
and then setup expound to catch exceptions and print them:
((expound/custom-printer {:theme :figwheel-theme}) (-> ex ex-data))
however orchestra is throwing on an internal expound spec when passing the data to print
. Any ideas?
orchestra spec error
{:clojure.spec.alpha/problems
[{:path [:id],
:reason "Insufficient input",
:pred clojure.core/string?,
:val (),
:via [],
:in []}],
:clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x6c28ecb7 "clojure.spec.alpha$regex_spec_impl$reify__2509@6c28ecb7"],
:clojure.spec.alpha/value nil,
:clojure.spec.alpha/fn org-api.get-identity-provider/get-all,
:clojure.spec.alpha/args nil,
:clojure.spec.alpha/failure :instrument,
:orchestra.spec.test/caller
{:file "handler.clj", :line 68, :var-scope org-api.handler/fn--26001}}
orchestra expound error
2020-08-11 13:40:42.368 | ERROR | qtp225104551-20 | {:clojure.spec.alpha/problems [{:path [:spec-name :clojure.spec.alpha/pred], :pred #{:args :ret :fn :clojure.spec.alpha/pred}, :val :id, :via [], :in [1]} {:path [:spec-name :clojure.spec.alpha/nil], :pred nil?, :val :id, :via [], :in [1]}], :clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x7d665d19 clojure.spec.alpha$regex_spec_impl$reify__2509@7d665d19], :clojure.spec.alpha/value ({:show-valid-values? false, :print-specs? true, :theme :figwheel-theme} :id nil [] nil), :clojure.spec.alpha/fn expound.alpha/value-in-context, :clojure.spec.alpha/args ({:show-valid-values? false, :print-specs? true, :theme :figwheel-theme} :id nil [] nil), :clojure.spec.alpha/failure :instrument, :orchestra.spec.test/caller {:file core.clj, :line 673, :var-scope clojure.core/apply}}
clojure.lang.ExceptionInfo: Call to #'expound.alpha/value-in-context did not conform to spec.
@charliebriggs I’m AFK today, but I can look tomorrow or Thursday. In the meantime, can you post the ex-data that is passed to expound?
As a workaround until there’s a fix, you could declare a new spec for “expound.alpha/value-in-context” (just allow any number of args) and see if that unblocks you.
Hey! The data is in the first code block above (“orchestra spec error”)
Does this reproduce if you don’t use orchestra and only use the default instrumentation?
just tried it, and it only seems to occur with orchestra
actually I think it may be more related to the spec I was varying on my server handlers to test this… I was changing the arity of :args
which may be what has caused this, seems to work fine now when testing again just by changing spec defs.
I might have wasted your time here! 😓