babashka 2025-06-18

Something changed in latest (I think) babashka making a task named init illegal. With bb.edn {:tasks {init (println "init")}}

❯ bb init 
init
----- Error --------------------------------------------------------------------
Type:     java.lang.IllegalStateException
Message:  Can't take value of a macro: #'user-c25a0a3d-87d1-4174-9298-a0efd556c2ad/init
Is it supposed to work?

βœ… 1

oh that sucks... I had created a macro in the tasks namespace which probably messes with this:

(defmacro init []
  (when-not (resolve '%s/__init?)
   (intern '%s '__init? true)
   '%s))

let me fix that, this is a bug

I'll release a fix right away

My colleague guessed: > probably introduced a macro called init πŸ˜„

hopefully __babashka$tasks$impl$init is a good enough name to not clash

Even I will have to use bb tasks a while before I name a task like that.

let me know when it happens, o wrongholder from birth

πŸ˜‚ 4
🀣 2

releasing, should be 15 minutes or so

Sweet! I don’t even need to rename the task then.

done

πŸ™ 1

You forgot "Disallow __babashka$tasks$impl$init as task name" in your release notes @borkdude πŸ˜†

PR welcome!

πŸ˜‚ 1

Now the CI pipeline works again. πŸŽ‰ πŸ™

βœ… 1

lol, I now ran into this myself with the squint bb.edn tasks

----- Error --------------------------------------------------------------------
Type:     java.lang.IllegalStateException
Message:  Can't take value of a macro: #'user-c3b37c84-44ef-4bc3-9302-caaa30a4ca73/init
https://github.com/squint-cljs/squint/blob/8084b05ff0bfb0729d1c7cc89b3d7a63a11eaaa8/playground/bb.edn#L2 Time to upgrade! πŸ€“

πŸ˜‚ 1

exoscale/coax is bb compatible fyi (it actually already was, it was just not tested) https://github.com/exoscale/coax/actions/runs/15734083913/job/44342049402

πŸŽ‰ 2

I know, coax has been tested in bb CI for a while :)

oh well, I had an issue open for this πŸ™‚ I guess we're really sure it works now

But looking at the bb.edn, you’re not actually running coax in bb, just starting JVM Clojure to run tests via a bb task?

hmm actually you might be right. I just copy pasted an example from a blog post a bit without thinking too much about it

Minus the timbre thing which was only necessary for fusebox to silence logging