This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-16
Channels
- # announcements (1)
- # aws (6)
- # babashka (17)
- # beginners (30)
- # calva (12)
- # cider (25)
- # circleci (2)
- # clojure (42)
- # clojure-australia (8)
- # clojure-czech (1)
- # clojure-europe (30)
- # clojure-france (52)
- # clojure-italy (2)
- # clojure-nl (16)
- # clojure-serbia (3)
- # clojure-uk (10)
- # clojurescript (40)
- # core-async (5)
- # cursive (24)
- # datalog (7)
- # datomic (8)
- # emacs (4)
- # events (1)
- # figwheel-main (3)
- # fulcro (2)
- # helix (5)
- # heroku (1)
- # kaocha (6)
- # leiningen (3)
- # malli (11)
- # music (5)
- # off-topic (20)
- # practicalli (1)
- # re-frame (4)
- # react (8)
- # reitit (14)
- # rewrite-clj (5)
- # rum (2)
- # schema (2)
- # shadow-cljs (23)
- # vrac (28)
- # wasm (4)
- # xtdb (12)
- # yada (5)
Hi all. Are people still using buddy-auth
? What about for apps that use reitit
for routing? Any promising alternatives?
I think the general consensus is that the various Buddy submodules are fine to use in production (although it's confusing that the root repo seems to be unmaintained).
There is a reitit-buddy-auth example in the repo https://github.com/metosin/reitit/tree/master/examples/buddy-auth
How to debug this error? I create a brand new project but get IllegalArgumentException: no conversion to symbol Clojure lein new re-frame duck
Retrieving re-frame/lein-template/2.1.2/lein-template-2.1.2.pom from clojars
Retrieving re-frame/lein-template/2.1.2/lein-template-2.1.2.jar from clojars
Generating re-frame project.
➜ Clojure cd duck
➜ duck shadow-cljs run
shadow-cljs - config: /home/hovgaard/Clojure/duck/shadow-cljs.edn
shadow-cljs - updating dependencies
Retrieving thheller/shadow-cljs/2.12.5/shadow-cljs-2.12.5-aot.jar from https://repo.clojars.org/
shadow-cljs - dependencies updated
running: npm install --save --save-exact [email protected] [email protected]
added 101 packages, and audited 102 packages in 2s
3 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
IllegalArgumentException: no conversion to symbol
clojure.core/symbol (core.clj:596)
clojure.core/symbol (core.clj:589)
shadow.cljs.devtools.cli-actual/do-clj-run (cli_actual.clj:70)
shadow.cljs.devtools.cli-actual/do-clj-run (cli_actual.clj:65)
shadow.cljs.devtools.cli-actual/blocking-action (cli_actual.clj:126)
shadow.cljs.devtools.cli-actual/blocking-action (cli_actual.clj:116)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:177)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:132)
clojure.core/apply (core.clj:669)
clojure.core/apply (core.clj:660)
shadow.cljs.devtools.cli-actual/-main (cli_actual.clj:219)
shadow.cljs.devtools.cli-actual/-main (cli_actual.clj:217)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core/apply (core.clj:665)
clojure.core/apply (core.clj:660)
shadow.cljs.devtools.cli/-main (cli.clj:75)
shadow.cljs.devtools.cli/-main (cli.clj:67)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core/apply (core.clj:665)
clojure.main/main-opt (main.clj:514)
clojure.main/main-opt (main.clj:510)
clojure.main/main (main.clj:664)
clojure.main/main (main.clj:616)
clojure.lang.Var.applyTo (Var.java:705)
clojure.main.main (main.java:40)
duck clojure --version
Clojure CLI version 1.10.3.822
duck java --version
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment 18.9 (build 11.0.10+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.10+9, mixed mode, sharing) (
@UTA54EFQF I suspect shadow-cljs is expecting a more recent version of Clojure (the language itself, not the CLI script). Check project.clj
and see what version of org.clojure/clojure
it has specified.
shadow-cljs watch app work fine... I used "shadow-cljs run" which needs more args. thx to thheller who replied in shadow-cljs channel. .. thx for reply seancorfield
Hello! I'm trying to use the basic swagger ui using reitit-swagger-ui but the webpage gives me an error and I just can't seem to figure out why. I'm generally copying from this project: https://github.com/metosin/reitit/blob/master/examples/ring-swagger/src/example/server.clj And the code is this:
(def app
(ring/ring-handler
(ring/router
[["/swagger.json"
{:get {:no-doc true
:swagger {:id "2.0"
:info {:title "my-api"
:description "something"}}
:handler (swagger/create-swagger-handler)}}]
["/api"
{:swagger {:id :my-api}}
["/checkImage"
{:post {:summary ""
:parameters {:multipart {:file multipart/temp-file-part}}
:responses {200 {:body {:errors true}}}
:swagger {:consumes ["image/jpg"]}
:handler checkImage}}]]]
{:data {:middleware [swagger/swagger-feature
multipart/multipart-middleware]}})
(ring/routes
(swagger-ui/create-swagger-ui-handler
{:path "/"})
(ring/create-default-handler))))
@U014A5N6CNN you may need to ask in #ring-swagger or #reitit if you don’t get a response here within another 30 minutes…
Ah, sorry 😞
@U04V70XH6 It's interesting. I'm looking deeper into this and when I replace the "/swagger.json" endpoint with this:
["/swagger.json" {:get {:handler (constantly {:status 200 :body "{\"swagger\": \"2.0\", \"x-id\": \"something\", \"paths\": {\"/api/checkImage\": {\"get\": {}}} }"})}}]
It works in a basic sense. But the output of things like the reitit swagger handler and the ring-swagger lib produces strings like this:
[:swagger "2.0"][:info {:title "Something", :version "1.0.0", :description ""}][:produces ["application/json"]][:consumes ["application/json"]][:paths {"/api/checkImage" {:post {:responses {:default {:description ""}}}}}][:definitions {}]
Swagger seems to want an actual JSON formatted text, but all these APIs don't produce that. This is bafflingNo idea, sorry. I’ve never used Reitit (or Swagger).
That latter output looks like something is turning a hash map into a seq though.
Okay. I think it's looking like I'm missing a middleware to change the data returned by these APIs into JSON format. Though none of the examples on reitit's docs specify you need this.. weird
You might also want to compare your list of middleware against what’s in that example project — in case something is mi… yup.
muuntaja does that, I thought?
https://github.com/metosin/reitit/blob/master/examples/ring-swagger/src/example/server.clj#L74-L91
Okay that worked! Though I'm not sure which of those middlewares were the actual one I was missing. I will suggest this be added to the docs on #reitit
I’m working on a web application. I want to link the menu options, to specific part of the page (in-page navigation) I’m having a problem, when I click the links of the menu, they are doing nothing…
@vfernandez11 shouldn't there be something before the pound symbol?
e.g i'm seeing what you have as #<link>
when what i imagine you need is <link>#section
If I link to another site eg https://www.google.com/ it's works well, but when use an anchor tag, the link do nothing