Good morning - I'm trying to figure out how to use https://github.com/AdGoji/aws-api with babashka, but I'm afraid I can't figure out how to actually reference the code? Do I need to checkout the project and provide a classpath a la -cp
somehow?
@cmdrdats I’ve only tested it with leiningen
. No with babashka
I’m doing some quick tests now with babashka but I see it goes wrong with loading the dependencies
ah, ok - for interest sake, how does one load dependencies in babashka?
thanks for testing this for me 🙂
Ah wait, I forgot an important detail.. You need the jvm to generate the requests maps. Once you have that you can probably call it from babashka (never tested that). So not ideal
So it uses the com.cognitect.aws library (currently only works on jvm) to generate the template request maps and with those templates you can call it in a GraalVM project and maybe babashka
ah, ye - not ideal :rolling_on_the_floor_laughing: I'll just handle it in plain old clj for now then - would have liked to run this in babashka, but no trainsmash
I understand 🙂
sorry for the disappointment
not at all! thanks for the effort, I appreciate it
@cmdrdats Many people just shell out to the aws CLI from babashka. Also there is an AWS pod: https://github.com/tzzh/pod-tzzh-aws
@borkdude ah, I see - makes sense - thank you 🙂
That aws pod is Go code generated from a specification (I believe) using Clojure (babashka itself). Pretty nifty :)
@thomas.ormezzano can maybe tell you more about it if you're interested. Right now you can't send blobs to s3 with it, this needs some special attention.
A WIP under consideration thing:
(require '[babashka.deps :as deps])
(deps/add-deps '{medley/medley {:mvn/version "1.3.0"}})
;; or should we support passing in `{:deps ...}` so we can also have :paths ["src" "test"]?
;; and what about aliases?
(require '[medley.core :as m])
(m/index-by :id [{:id 1} {:id 2}]) ;; works
This now works in the branch babashka-deps
(see #babashka_circleci_builds).
It shells out to java
for resolving deps but just like clojure
it is fast once the classpath is cached.Feel free to discuss here: https://github.com/borkdude/babashka/issues/473#issuecomment-740559228
Awesome, the babashka repo now has a place for discussions, Q/A, etc. https://github.com/borkdude/babashka/discussions
I assume it's possible to open a new topic there for others than me?
Yep, I can see a big green "New discussion" button