This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-30
Channels
- # announcements (20)
- # asami (26)
- # babashka (10)
- # babashka-sci-dev (18)
- # beginners (81)
- # biff (6)
- # calva (6)
- # cider (1)
- # clerk (1)
- # clj-kondo (34)
- # clojure (50)
- # clojure-belgium (1)
- # clojure-berlin (6)
- # clojure-europe (20)
- # clojure-nl (1)
- # clojure-norway (22)
- # clojure-uk (2)
- # clojurescript (1)
- # clr (4)
- # community-development (3)
- # data-science (8)
- # datomic (3)
- # gratitude (1)
- # honeysql (6)
- # instaparse (2)
- # jobs (1)
- # jobs-discuss (13)
- # kaocha (7)
- # london-clojurians (1)
- # lsp (6)
- # malli (8)
- # matcher-combinators (9)
- # missionary (3)
- # nbb (8)
- # off-topic (20)
- # pathom (16)
- # polylith (2)
- # practicalli (3)
- # rdf (1)
- # re-frame (7)
- # reagent (3)
- # releases (2)
- # reveal (6)
- # rewrite-clj (22)
- # shadow-cljs (64)
- # tools-build (7)
- # xtdb (13)
Hi @borkdude could you do me a favor? Could you re-star my repo again? I had to reset the git repo to remove my actual legal name from the git commits: https://github.com/arunthecoder97/pandoc-spiceland
It seems cljfmt.core works with babashka:
bb -Sdeps '{:deps {cljfmt/cljfmt {:mvn/version "0.9.2"}}}' -e "(require '[cljfmt.core]) (println (cljfmt.core/reformat-string (slurp \"/tmp/dude/foo.cljs\")))"

About 9x faster than clojure due to (lack of) startup overhead https://github.com/weavejester/cljfmt/pull/293#issuecomment-1409494166
Using eftest with tasks and get reasonable output in github actions (not hundreds of progress lines):
test:bb {:extra-deps {eftest/eftest {:mvn/version "0.6.0"}}
:extra-paths ["test"]
:requires ([eftest.runner :refer [find-tests run-tests]])
:task (let [{:keys [fail error]} (run-tests
(find-tests "test")
(when-not (System/console)
;; better output in github actions
{:report clojure.test/report}))]
(when (or (pos? fail)
(pos? error))
(throw (ex-info "Tests failed" {:babashka/exit 1}))))}}}
Is there some way to run a cleanup task, if the user kills some long-running task?
I have
clerk-watch
{:doc "Start a shadow-cljs watch process that generates this project's custom JS."
:task (X "clojure -X:nextjournal/clerk user/start!")}
and it would be nice to run
user/stop!
on exit… I see as I’m typing this that that doesn’t make sense thoughsince we’re invoking clojure
I would have to do it from inside the clojure fn
test/babashka/shutdown_hook_test.clj
17: (let [script "(-> (Runtime/getRuntime) (.addShutdownHook (Thread. #(println \"bye\"))))"
About 9x faster than clojure due to (lack of) startup overhead https://github.com/weavejester/cljfmt/pull/293#issuecomment-1409494166