babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
2020-12-21T20:05:48.359300Z

Hey! Thanks for the awesome work on babashka! I'm trying to port some internal tooling to it. Currently the tool integrates with projects as a lein profile which loads a dependency. invoked using lein run -m xxx. Right now I set BABASHKA_CLASSPATH using lein classpath, but that boots an entire jvm to calculate the classpath. Is there a faster / other recommended way? Thanks

borkdude 2020-12-21T20:06:56.359800Z

@jeroen.dejong what do you need on the babashka classpath? only directories?

borkdude 2020-12-21T20:07:10.360Z

or also jar / gitlibs?

2020-12-21T20:07:21.360100Z

The tool lives on a private maven repository, including some deps indeed.

borkdude 2020-12-21T20:08:10.360300Z

To add deps to the bb classpath from maven, you can use babashka.deps (brand new): https://book.babashka.org/#babashkadeps

😮 1
borkdude 2020-12-21T20:08:16.360600Z

this comes with 0.2.5

borkdude 2020-12-21T20:08:40.360900Z

it will invoke java once for calculating the classpath but after that its cached

2020-12-21T20:11:36.361100Z

That seems great! The caching with clj -Sdeps works neatly, so i'm stoked. Already on 2.5 so I'll give it a spin! Thanks

borkdude 2020-12-21T20:13:08.361400Z

it's using the same tools.jar as the official Clojure CLI, just a different "front-end" so to speak. babashka also supports --clojure as an alternative CLI to the official Clojure CLI for invoking a JVM Clojure

borkdude 2020-12-21T20:13:20.361600Z

bb --clojure -Spath
for example

2020-12-21T20:17:21.362Z

All our projects are on leiningen right now, but it's just 1 dependency for the tool. I think finding the right deps according to the nearest project.clj should be doable 🙂

borkdude 2020-12-21T20:18:53.362300Z

Yeah, sure, parsing a project.clj ain't that hard