This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-30
Channels
- # asami (10)
- # babashka (14)
- # beginners (71)
- # calva (56)
- # cider (8)
- # cljs-dev (3)
- # clojure (111)
- # clojure-australia (1)
- # clojure-europe (19)
- # clojure-nl (4)
- # clojure-uk (147)
- # clojurescript (4)
- # cursive (8)
- # datalog (1)
- # datomic (19)
- # emacs (4)
- # graalvm (32)
- # helix (14)
- # jackdaw (7)
- # jobs-discuss (10)
- # juxt (4)
- # lsp (3)
- # malli (47)
- # meander (6)
- # off-topic (29)
- # portal (6)
- # re-frame (1)
- # react (3)
- # reitit (24)
- # releases (1)
- # remote-jobs (4)
- # reveal (33)
- # rewrite-clj (3)
- # shadow-cljs (5)
- # sql (10)
- # tools-deps (4)
- # vim (7)
- # xtdb (151)
babashka 0.3.7 Issues resolved: https://github.com/babashka/babashka/blob/master/CHANGELOG.md#037 Task changes/improvements: https://github.com/babashka/babashka/issues/778
Most notable task changes:
- Tasks now have :enter
and :leave
hook which can be set globally under :tasks
and can be overridden per task
- New current-task
function which contains :name
of the task and all of the other data of the task map from the bb.edn
file
- The above two things together can be used to log task names (at the start and/or end of a task)
- New run
function: (run 'my-task {:parallel true})
to invoke other tasks in serial, force parallel, do whatever you want.
I already kinda regret the run
name, maybe I should have chosen run-task
to not confuse it with run!
?
I think the run
name is fine, there is the clojure run!
, but in the babashka tasks context I think run
makes sense
Nothing is set in stone, esp with software 😉 You could accrete it, and notify deprecate the run
name, then in a few releases, remove it completely.
Well, I chose it like this since the bb run
subcommand is also called like this and this function accepts the same opts
But like with all names, I fret about those for weeks, change them, and sometimes and up reverting them to go back to the same name, so I take my regret with a grain of salt and I will listen to the feedback of users as well
Anyway, (shell "bb run --parallel ...")
is now a thing of the past:
-dev {:depends [dev-cljs dev-less]}
dev {:doc "Run app in dev mode, watch CLJS and LESS files for changes"
:task (run '-dev {:parallel true})}
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors. -- Leon Bambrick
Small demo of how you can use :enter
and :leave
to print task names while they progress:
https://github.com/clj-kondo/clj-kondo.lsp/blob/e906d4fc64f070311644529430b035bf9cbb7a0d/bb.edn#L7-L12