Fork me on GitHub

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.

🎉 8

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


Anyway, naming is hard.

☝️ 8

Maybe a nice naming convention:

clean+dev (do (run 'clean)
              (run 'dev))
bb clean+dev


it's not too late to change it 🙂


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:

❤️ 3
👍 3