Fork me on GitHub
#babashka
<
2023-01-11
>
Glenn Lewis02:01:19

Sorry for the newbie question, but could babashka be used to load+parse a https://github.com/metosin/malli#json-schema file then use https://github.com/metosin/malli#plantuml all in one script?

borkdude09:01:31

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.

borkdude12:01:22

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

đź‘Ť 2
nixin7215:01:19

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

borkdude16:01:57

There was just a conversation about this: https://clojurians.slack.com/archives/CLX41ASCS/p1673105909420349 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 $@

nixin7217:01:26

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

borkdude17:01:40

no worries :)

nixin7215:01:51

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

jkrasnay20:01:23

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?

jkrasnay21:01:59

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

jkrasnay21:01:57

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

borkdude21:01:50

Perhaps the babashka wiki is also a good place

jkrasnay00:01:34

Ah yes, that’s better. Done.

Huahai23:01:14

----- 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

Huahai23:01:10

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

Huahai23:01:52

The require doesn’t seem to work

Huahai23:01:46

where does a bb task find its deps?

Huahai23:01:57

Never mind, it works now. Sorry for the noise

Huahai23:01:49

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

borkdude09:01:29

Glad you figured it out

Huahai16:01:57

Thanks for all the great tools!

đź‘Ť 2