Fork me on GitHub
Glenn Lewis02:01:19

Sorry for the newbie question, but could babashka be used to load+parse a file then use all in one script?


How would you do this without babashka, in clojure JVM? And doesn't that approach work in babashka?

Glenn Lewis11:01:39

I'm hitting a brick wall with that approach so far, but am still working on it. Thanks, @U04V15CAJ - that makes sense that once I solve the problem then I should be able to use babashka to do it. I apologize for the noise.


I was just wondering if something didn't work in bb that did work in the JVM, that happens

👍 2

Does babashka support any sort of "user-level" tasks? It's great having the tasks stuff available at a project level, but I'd like to define user-level tasks as a way of being able to run stuff from kinda anywhere through one interface and see all my tasks through bb tasks . As opposed to sourcing a scripts directory and trying to remember what all is in there


There was just a conversation about this: There's two ways to address this: • Make scripts and add them to your path, also see #babashka-bbin • Use a global bb.edn and write a bash script or alias which does something like:

bb --config ~/my_global_project/bb.edn $@


Oh hahah guess I should've just scrolled up :face_palm: Thank you so much, I'll read through this!


no worries :)


I didn't see anything about it in the babashka book, so I assume not, but figured it was worth confirming


I’m trying to run a Babashka nrepl on a server via ssh, so I can edit scripts locally but eval them on the server. I’m starting the server like this:

ssh -L1777:localhost:1667  bb --nrepl-server
This works fine, but when I kill the ssh client it leaves bb running on the server. When I leave off the --nrepl-server flag, killing ssh also kills the bb process on the server. Does anyone have an idea how to have the nrepl server automatically terminated?


Gah, my google-fu is weak. The -t flag fixed things up. Thanks!


Would this be worth a note in the Babashka Book? I’m happy to write something up.


Perhaps the babashka wiki is also a good place


Ah yes, that’s better. Done.


----- Error --------------------------------------------------------------------Type: clojure.lang.ExceptionInfoMessage: Could not resolve symbol: ghr/release-artifactData: {:type :sci/error, :line nil, :column nil, :file “<expr>“, :phase “analysis”}Location: <expr>:26:1Phase: analysis----- Context ------------------------------------------------------------------22: nil23: (def release-artifact (binding [24: babashka.tasks/task ’{:name release-artifact, :task (ghr/release-artifact {:org “juji-io”, :repo “datalevin”, :tag “0.7.12", :file (System/getenv “DTLV_ARCHIVE”), :overwrite true})}]25: nil26: (ghr/release-artifact {:org “juji-io”, :repo “datalevin”, :tag “0.7.12", :file (System/getenv “DTLV_ARCHIVE”), :overwrite true}))) release-artifact ^--- Could not resolve symbol: ghr/release-artifact


invoked as bb --config ../.build/bb.edn release-artifact


The require doesn’t seem to work


where does a bb task find its deps?


Never mind, it works now. Sorry for the noise


I had a --deps-root that shouldn’t be there.


Glad you figured it out


Thanks for all the great tools!

👍 2