This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-30
Channels
- # announcements (3)
- # babashka (5)
- # beginners (68)
- # calva (34)
- # cider (6)
- # cljsrn (3)
- # clojure (48)
- # clojure-australia (2)
- # clojure-europe (1)
- # clojure-nl (4)
- # clojure-spec (28)
- # clojurescript (10)
- # conjure (20)
- # datahike (1)
- # deps-new (1)
- # depstar (27)
- # events (2)
- # fulcro (61)
- # graalvm (32)
- # membrane (18)
- # off-topic (20)
- # practicalli (10)
- # reagent (2)
- # shadow-cljs (8)
- # slack-help (20)
- # spacemacs (9)
- # sql (5)
- # vim (10)
- # xtdb (8)
good morning! I'd like a suggestion: is there a way of adding specs to functions so that when a function is called, the spec is executed, and if the spec fails I get a complete trace? I checked out ghostwheel
(I really liked the co-located queries), but it seems not maintained anymore, and the successor guardrails
, on which the documentation for this usecase seems scarce. How do you do this? What libraries would you suggest?
Hello everyone! I'm trying to pass around some quoted code for a dummy project, datalog queries to be specific. I'd have the following:
(def query '[:find ...])
(http/post "" {:edn-params {:query query}})
I'm getting an error in the console:
#error {:message "No reader function for tag object.", :data {:type :reader-exception, :ex-kind :reader-error}}
Whats the proper way of passing along ("referencing") the quoted query?Figure out what the server receives. Seems like the query has something that it shouldn't have, i.e. a non-CLJS data structure.
Or, which should be the same, figure out what the browser sends (assuming you're doing it from a browser). It's actually easier - just look at the Network tab of the DevTools.
If I replace the reference {:query query}
with the actually query {:query '[:find ...]}
it works, so I don't think there is anything inside the query that is causing problems
I have no idea why you would see that behavior then. Are you sure that query
inside {:query query}
is the very same query as in (def query ...)
, that nothing rebinds the name to something else in that scope?
If yes, then maybe http/post
is a macro that does something strange. Apart from that, no idea.