babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
Lyderic Dutillieux 2021-06-22T10:15:18.154900Z

Hey, I was wondering two things : • Is there a way to make the clj-http lib work with babashka • If not, is there a way to 'shadow' clj-http with clj-http-lite (kind of the same feature as yarn resolutions, each time sci sees a clj-http namespace it resolves it to clj-http-lite Thanks in advance

borkdude 2021-06-22T10:17:07.156200Z

@lyderic.dutillieux clj-http doesn't work (from source) with babashka. clj-http-lite does work (https://github.com/babashka/clj-http-lite). You could "fake" clj-http by defining similar namespaces and just def-ing vars that point to the clj-http-lite ones. Can you provide some background as to why you need this?

borkdude 2021-06-22T10:18:11.157Z

Also babashka packages both babashka.curl and org.httpkit.client which you could also use to "fake" clj-http, which saves you the burden of loading clj-http-lite from source.

Lyderic Dutillieux 2021-06-22T10:21:21.160700Z

The use case is that I have a leiningen project with some utilities that rely on clj-http and are used in production, and now I'ld like to have some developer tasks to execute some of these functions. I could use leiningen tasks actually, but if babashka supports it, I'm enclined to use it 🤓

borkdude 2021-06-22T10:21:53.161600Z

@lyderic.dutillieux if you control the code, then it's easier. you could just make .cljc files and use :bb reader conditionals

Lyderic Dutillieux 2021-06-22T10:22:59.162100Z

Good to know, thanks for the pointers :)