Fork me on GitHub
#reitit
<
2022-11-05
>
valerauko10:11:40

I noticed that with "0.5.18" the router options :inject-router? and :inject-match? are ignored. Even if I pass in false the router and match objects are injected in the request. Am I doing something wrong?

(reitit.ring/ring-handler
 (reitit.ring/router
  [,,,]
  {:data {,,,}})
 {:inject-match? false
  :inject-router? false})

valerauko10:11:51

Also I can't seem to get the muuntaja ring middleware to work. It doesn't encode the response when set up according to the docs...

John Tran18:11:18

Sorry if this has been asked, but I am seeing this annoying warning with monger. But only when I am using it with reitit, does anyone have a suggestion on how to address it (other than ignoring it)?

WARNING: random-uuid already refers to: #'clojure.core/random-uuid in namespace: monger.util, being replaced by: #'monger.util/random-uuid

jeroenvandijk19:11:25

Its arbitrary that this occurs together with reitit. Monger apparatus adds random-uuid which is, since a newer clojure version, now part of the clojure.core namespace. To fix it the monger library needs to be patched. Either to remove random-uuid for newer clojure versions, or put random-uuid in an :exclude

John Tran19:11:21

Argh. I tried :exclude and does not seem to work which is annoying. Unless, I am doing it wrong 😛

John Tran19:11:34

@U0FT7SRLP sorry, can you provide an example (or insight) into how exclude? Should this be doing in the project.clj or is this done in the .clj files that reference monger?

John Tran19:11:06

ahh yes, I see that monger developers are noticing the issue https://github.com/michaelklishin/monger/pull/216

jeroenvandijk07:11:00

They merged it in master so maybe you can already use it in your project with deps.edn

John Tran21:11:00

ack. I use lein and it appears that even with monger 3.6.0 did not make it to clojars. For now it's annoying but tolerable. Hopefully it will make its way to clojars soon. Thanks for the reply. Really appreciate it.