This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-18
Channels
- # adventofcode (26)
- # announcements (3)
- # babashka (12)
- # beginners (20)
- # biff (33)
- # cider (4)
- # clj-kondo (9)
- # cljdoc (17)
- # clojure (35)
- # clojure-art (6)
- # clojure-belgium (1)
- # clojure-denmark (1)
- # clojure-europe (1)
- # clojure-norway (25)
- # clojurescript (29)
- # conjure (19)
- # cryogen (1)
- # datomic (23)
- # honeysql (2)
- # java (3)
- # joyride (9)
- # lsp (24)
- # malli (3)
- # nbb (2)
- # off-topic (25)
- # pathom (2)
- # pedestal (8)
- # portal (1)
- # practicalli (7)
- # re-frame (1)
- # reitit (4)
- # releases (1)
- # shadow-cljs (14)
Can I somehow use babashka pods in deps.edn projects?
Cool, I was asking because theres this https://github.com/babashka/pod-babashka-go-sqlite3, but could not find similiar one from clojars. Is it babashka-pod only or am I looking from the wrong place?
What I meant is you can add this dependency in your JVM project: https://github.com/babashka/pods And then use pods you like you do in bb
got it
I'm trying to use Google's Java API for Drive and curiously when I import it as (:import [com.google.api.services.drive.Drive])
it returns nil but when I try it with the syntax I understand to be correct (i.e. (:import [com.google.api.services.drive Drive])
) it throws an exception saying it cannot resolve the class
@U03QBKTVA0N The first seems to be a case of not verifying like clojure does:
$ clj -M -e "(ns foo (:import [com.google.api.services.drive.Drive]))"
Syntax error macroexpanding clojure.core/ns at (REPL:1:1).
((:import [com.google.api.services.drive.Drive])) - failed: Extra input spec: :clojure.core.specs.alpha/ns-form
The syntax isn't correct. If you use clj-kondo it will also tell you that:The real problem is that babashka doesn't support loading Java classes that are not built-in.
oh, that certainly makes sense. This is the first time I've used BB so good to know.
You may try to use #C029PTWD3HR (Node.js babashka) which doesn't have this limitation: you can use any Node library in it that you want.
I have been wanting to check out nbb too so I'll give that a go, thanks @U04V15CAJ