This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # beginners (69)
- # boot (1)
- # cider (35)
- # clara (1)
- # cljs-dev (1)
- # clojure (40)
- # clojure-spec (11)
- # clojure-uk (8)
- # clojurescript (9)
- # cursive (1)
- # datomic (5)
- # figwheel-main (25)
- # fulcro (64)
- # jobs (2)
- # jukebox (1)
- # kaocha (3)
- # off-topic (7)
- # pathom (39)
- # planck (5)
- # random (1)
- # re-frame (11)
- # reagent (8)
- # shadow-cljs (58)
- # test-check (41)
- # vim (13)
only when want to lein uberjar, with figwheel it works
if I don't use
(wrap-defaults site-defaults) it doesn't throw this error
Base on that stack trace @paul931224 it sounds like you're putting something invalid in the cookie "scope"?
I deleted all the wrappers, where am I putting something in a cookie other than there?
and why only with
wrap-defaults adds a bunch of logic, and checks, around various parts of the Ring request/response so you wouldn't get the exception without it because not much is checked.
Without seeing all your code it's hard to say what the problem is, but that error suggests that it thinks you are putting "bad attributes" into the
:cookies key of the Ring request/response...
I also use sente, can it be the problem?
and why is this specific too compiling? with lein figwheel works well
I can show all my code, but it is a pretty big project, I just wanted to put it up on the server
I'd be surprised if Sente was incompatible with Ring defaults...
I would add some
println debugging to see what the Ring request/response looks like and see if you can figure out what's the various submaps...
I don't even know how that "_ga" gets there, I dont have google analytics, I also remove google maps too
oh, it was in cache, same error, nothing in :cookies
well, it was a dependency problem
:exclusions [ring/ring-core] solved it
[ring-transit-middleware "0.1.3" :exclusions [ring/ring-core]]
thank you anyway, I never tried printing in a wrapper before, the more you know... 😄
I would like to use
tap> to debug. But since
true/`false` and not the provided parameter, this is not trivial. What would be an elegant statement, which calls
tap> whith my statement
(+ 1 2) and then returns the value of my statement?
Having tap> return the val is a pretty good idea - if you write up a CLJ jira for it, that would remind me to talk to Rich about it
Or adding spy> or something
I’m trying to write a macro that will allow me to def a var with certain metadata attached. Using the reader macro in the middle of the macro doesn’t work!
got it working! my motivation for this is to def a function in a namespace and preserve the docstring and arglists of a function from another namespace:
(defmacro def-with-doc [nom var-sym] (let [doc (-> var-sym resolve meta :doc) arglists (-> var-sym resolve meta :arglists)] `(do ~(if doc `(def ~nom ~doc ~(-> var-sym resolve deref)) `(def ~nom ~(-> var-sym resolve deref))) ~(when arglists `(alter-meta! (var ~nom) assoc :arglists (quote ~arglists)))))) (def-with-doc inspect ins/inspect)
this library has
import-vars that does a similar thing, it keeps docstrings and works for fuctions and macros https://github.com/ztellman/potemkin
assoc :doc in the way you handle
:arglists, then you don't need the
if special case.
You can avoid the conditionals altogther, like this
(defmacro def-with-doc [nom var-sym] `(do (def ~nom ~(-> var-sym resolve deref)) (alter-meta! (var ~nom) merge '~(-> var-sym resolve meta (select-keys [:doc :arglists])))))
If you want that to work for macros too, add
:macro to the keys in the