I used to be able to directly call functions defined in clojure files in my script directory like:
;;in bb.edn
{:paths ["script"]
:tasks {test (my-utils/test)}}
But now I need to require the namespace first for it to work:
;;in bb.edn
{:paths ["script"]
:tasks
{:init (require 'my-utils)
test (my-utils/test)}}
Was that a change in babashka or am I missing something?If you mention the function without parens it works without a require. With parens itโs an arbitrary expression which needs an explicit require
Thatโs always been like that, nothing changed
Ah, I see now in my older bb projects that "used to work" there are no parens. So PEBCAK ๐
have you defined a namespace? in the script
I did, yes
I also tried a namespace without a "-" just in case it was that
ok what about no namespace at all?
i'm just thinking loud ๐
a clj file with no namespace does not work either
The extra require in the bb.edn file is not a big deal. I was just curios why it it was not required in the past.