Fork me on GitHub

Using babashka.deps requires java, any particular version? is it needed just for the downloading of deps


Every Java version that works with the clojure CLI should also work with that


found the uberjar command, that's better for packaging than calling the deps stuff at runtime, right?


at least I don't need to install java on the machine that is running the script

Karol Wójcik05:04:29

(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {borkdude/rewrite-edn {:mvn/version "0.1.0"}}})
(require '[borkdude.rewrite-edn :as r])
❯ ~ bb bb.clj  
----- Error --------------------------------------------------------------------
Type:     java.nio.file.NoSuchFileException
Message:  /home/fierycod/.m2/repository/borkdude/rewrite-edn/0.1.0/rewrite-edn-0.1.0.jar
Location: /home/fierycod/bb.clj:3:1

----- Context ------------------------------------------------------------------
1: (require '[babashka.deps :as deps])
2: (deps/add-deps '{:deps {borkdude/rewrite-edn {:mvn/version "0.1.0"}}})
3: (require '[borkdude.rewrite-edn :as r])
   ^--- /home/fierycod/.m2/repository/borkdude/rewrite-edn/0.1.0/rewrite-edn-0.1.0.jar

----- Stack trace --------------------------------------------------------------
sun.nio.fs.UnixFileAttributeViews/Basic      - <built-in>                 - <built-in>      - <built-in>
babashka.impl.classpath/path-from-jar        - <built-in>
babashka.impl.classpath.Loader/fn--17669     - <built-in>
clojure.core/some                            - <built-in>
babashka.impl.classpath/source-for-namespace - <built-in>
babashka.main/exec/load-fn--35746            - <built-in>
user                                         - /home/fierycod/bb.clj:3:1
First time seeing this. Removing .cpcache and /.m2/repository + .gitlibs doesn't help.
❯ ~ bb --version
babashka v0.7.8

Karol Wójcik05:04:12

It looks like rewrite-clj with 0.1.0 version cannot be downloaded, but 0.0.2 downloads and runs successfully.


This helped:

borkdude@MBP2019 ~ $ rm -rf ~/.clojure/.cpcache
borkdude@MBP2019 ~ $ bb /tmp/dude.clj
Downloading: borkdude/rewrite-edn/0.1.0/rewrite-edn-0.1.0.pom from clojars
Downloading: borkdude/rewrite-edn/0.1.0/rewrite-edn-0.1.0.jar from clojars

👍 1

It should also have worked with --force but for some reason it didn't...


which could be a bug

Karol Wójcik07:04:34

Yeah. I’ve tried with —force, but it didnt work either.