This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-18
Channels
- # adventofcode (20)
- # aleph (25)
- # announcements (4)
- # babashka (117)
- # beginners (150)
- # calva (4)
- # cider (9)
- # clj-on-windows (2)
- # clojure (9)
- # clojure-europe (4)
- # clojure-italy (3)
- # clojuredesign-podcast (18)
- # clojurescript (16)
- # conjure (1)
- # core-async (35)
- # cursive (13)
- # datalevin (6)
- # datomic (6)
- # fulcro (8)
- # hyperfiddle (5)
- # malli (8)
- # nextjournal (4)
- # off-topic (51)
- # pathom (4)
- # reagent (21)
- # sci (14)
- # shadow-cljs (22)
- # specter (3)
- # testing (22)
- # tools-deps (8)
- # xtdb (7)
A short question: Does/Can bb uberscript package pods into the output? I didn’t find the info in the docs…
Pods are binary files and uberscripts are just text. Pods aren't packaged within the scripts.
I'm reading https://github.com/babashka/pods docs and having trouble understanding how it works the pod process 🧵
I see that the readme mention about pod client sending a bencode encoded message {"op" "describe"}
but testing with clj-kondo pod how can I test that locally? I tried:
echo 'd2:op8:describee' | clj-kondo
how the communication works? because just running clj-kondo
prints the help and quit
My question is more like, how the proccess is kept open to receive and send bencode if running clj -M:clj-kondo/dev
just print the help and quit
Maybe we should mention https://github.com/babashka/pods#environment before https://github.com/babashka/pods#message-and-payload-format? not sure it'd help
all clojure-lsp api functions receive a arg project-root
which is a http://Java.io.File
yes, but if you want, we can make it work with files via transit. let me look up how this worked
here's the code for now: https://github.com/clojure-lsp/clojure-lsp/pull/674/files
look here. https://github.com/babashka/babashka-sql-pods/blob/565ddd75b7b986332f9ae93555342d37a727c22e/src/pod/babashka/sql.clj#L172-L195 There we register a handler for LocalDateTime
Someone at nubank asked this week if there was a way to run clojure-lsp from babashka and I remembered this pod issue 😅
I know I recommended pod.x.x.
but I changed my mind on that. We also do it in tools.bbuild: we use the tools.deps.alpha pod which just exposes those namespaces
and then tools.bbuild which is a minor fork of tools.build can run with almost no changes
What you can also do if you don't want to do the file transformation via transit, is create a client side wrapper function via "code"
e.g.
"code": "(defn api-fn [x] (-api-fn (str x)))
and then also expose -api-fn
which takes a string, converts it to a file and then call your API function for realzthe UX would be the same: you accept a file and the user doesn't notice that you convert it to a string and send that string to the pod
it would not go automatically. you would also write the -api-fn
on the pod side and do the conversion there
oh btw, @U0HFRSY0M also did the transit file thing here for tools-deps-native: https://github.com/babashka/tools-deps-native/blob/f4112ed47c2c2788b9363a0a5fa194239f20121e/src/borkdude/tdn/pod.clj#L51-L74
the alias here isn't necessary btw: https://github.com/babashka/tools-deps-native/blob/f4112ed47c2c2788b9363a0a5fa194239f20121e/src/borkdude/tdn/pod.clj#L63
just write out babashka.pods
in full
Hum, I think I can't call it clojure-lsp.api
because the pod-test
will try to require the clojure-lsp.api
instead the dynamically created by babashka.pods 😅
I just saw babashka.pods
latest release https://github.com/babashka/pods/blob/v0.0.1/src/babashka/pods.clj add-transit-read-handler!
function, only on master, is it possible to do a release of it later?
is just that I'd like to use a release on clojure-lsp deps.edn instead of a git sha 😅