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?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
releasing, should be 15 minutes or so
Sweet! I donβt even need to rename the task then.
done
You forgot "Disallow __babashka$tasks$impl$init as task name" in your release notes @borkdude π
PR welcome!
Now the CI pipeline works again. π π
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! π€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
I know, coax has been tested in bb CI for a while :)
https://github.com/search?q=repo%3Ababashka%2Fbabashka%20coax&type=code
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
This is probably a good example to copy: https://github.com/potetm/fusebox/blob/eff9cb8eb1b1c5264bb7854eb97aab533ed6d6bd/bb.edn#L2
Minus the timbre thing which was only necessary for fusebox to silence logging
thanks