is jline allready in mainline babashka?
it's in the dev build from master:
bash <(curl ) --dev-build --dir .
./bb ...
Please try it out so we can see if there's missing functionality :)I will definetly do i have currently one new oportunity to add babashka 😉
and i'm sorry that i'm quite quiet about all the stuff even borkweb but i have new ideas and to little time 😄
it's your life, no obligations ;)
Hi! I have a library I want to add to my bb script, but it depends on clj-http
And that depends on a JAR, Apache’s commons-codec , that is not in SCI
Is there a way I can add all the dependencies I need to my script?
New Java classes can unfortunately not be loaded by Babashka at runtime. Therefore, commons-codec can't be added without changing Babashka itself.
But there's a Babashka-compatible HTTP-client with an API very similar to clj-http: https://github.com/babashka/http-client/
I'd try using that!
So I need to refactor the original library to use bb’s http client?
Ooh, not your library. Yes, if you go for babashka/http-client. And I don't see any other solution.
Is the library open source?
Either that or you can mock clj-http's function calls in a fake namespace that calls bb.http-client or so?
No, it’s my library. I can edit it.
But it’s used by several projects & trying to load a ns that depends on clj-http inside a babashka REPL throws (because the REPL tries to load the JAR that doesn’t exist).
True. You can also use reader conditionals if you don't like to switch over callers of your lib to bb.http-client
or a macro:
(defn if-bb [then else]
(if (System/getProperty "babashka.version") then else))Thanks for all the help!