Fork me on GitHub
#babashka
<
2022-08-04
>
pinkfrog06:08:56

Is it possible to use https://github.com/borkdude/deps.clj. inside a clj app (instead of bb) ?

borkdude06:08:21

You can call the -main function from clj

pinkfrog06:08:30

The good thing with bb.process is the API is the same across bb and clj. For deps, so I have to differentiate the two.

borkdude06:08:15

Yeah, can't help it, adding things to the classpath works differently in the JVM

thanks3 1
borkdude09:08:05

One way I'm going to deal with this:

(ns babashka.neil.test
  (:require #?(:bb [babashka.deps :as deps])
            [babashka.process :refer [shell]]))

(defn clojure [& args]
  #?(:bb (apply deps/clojure args)
     :clj (apply shell "bb clojure" args)))

borkdude09:08:21

Improved version:

(ns babashka.neil.test
  (:require #?(:bb [babashka.tasks :as t])
            [babashka.process :refer [shell]]
            [clojure.edn :as edn]))

(defn clojure [& args]
  #?(:bb (apply t/clojure  {} args)
     :clj (apply shell {} "bb clojure" args)))

Dimitar Uzunov11:08:08

@borkdude - I think your blog is down, I was trying to access this post https://blog.michielborkent.nl/aws-lambda-nbb.html

borkdude11:08:44

it works for me...

Dimitar Uzunov11:08:08

weird it works now for me too

jmglov13:08:52

Whew! I assumed that was my fault! 😅

borkdude20:08:14

^ clj-commons/etaoin is now released on clojars and is bb-compatible

🎉 2