babashka

pez 2025-06-18T11:51:50.464369Z

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
borkdude 2025-06-18T11:53:43.947959Z

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))

borkdude 2025-06-18T11:54:04.535819Z

let me fix that, this is a bug

borkdude 2025-06-18T11:59:08.750379Z

I'll release a fix right away

pez 2025-06-18T11:59:11.637759Z

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

borkdude 2025-06-18T11:59:58.753699Z

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

pez 2025-06-18T12:00:36.454659Z

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

borkdude 2025-06-18T12:01:01.063279Z

let me know when it happens, o wrongholder from birth

πŸ˜‚ 4
🀣 2
borkdude 2025-06-18T12:02:26.063979Z

releasing, should be 15 minutes or so

pez 2025-06-18T12:05:18.894739Z

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

borkdude 2025-06-18T12:31:33.605399Z

done

πŸ™ 1
cjohansen 2025-06-18T12:33:53.464129Z

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

borkdude 2025-06-18T12:34:12.447779Z

PR welcome!

πŸ˜‚ 1
cjohansen 2025-06-18T12:34:44.150369Z

pez 2025-06-18T12:41:55.452869Z

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

βœ… 1
borkdude 2025-06-19T09:33:20.917829Z

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
mpenet 2025-06-18T13:25:55.923359Z

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
borkdude 2025-06-18T14:03:28.899279Z

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

mpenet 2025-06-18T14:04:13.302559Z

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

borkdude 2025-06-18T14:05:47.845369Z

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?

mpenet 2025-06-18T14:06:56.289529Z

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

borkdude 2025-06-18T14:08:19.674549Z

This is probably a good example to copy: https://github.com/potetm/fusebox/blob/eff9cb8eb1b1c5264bb7854eb97aab533ed6d6bd/bb.edn#L2

borkdude 2025-06-18T14:09:16.483269Z

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

mpenet 2025-06-18T14:09:29.242969Z

thanks