Fork me on GitHub
#babashka
<
2020-12-21
>
thumbnail20:12:48

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

borkdude20:12:56

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

thumbnail20:12:21

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

borkdude20:12:10

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

😮 3
borkdude20:12:16

this comes with 0.2.5

borkdude20:12:40

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

thumbnail20:12:36

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

borkdude20:12:08

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

borkdude20:12:20

bb --clojure -Spath
for example

thumbnail20:12:21

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 🙂

borkdude20:12:53

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

borkdude20:12:10

or also jar / gitlibs?