I can't seem to load a user.clj using babashka, am I missing something here? Repro:
mkdir src
echo '(ns not-user) (defn foo [_] (println "bar"))' > src/not_user.clj
echo '(ns user) (defn foo [_] (println "bar"))' > src/user.clj
then
filipesilva@m4 ~/r/s/bb-user-clj> bb -Sdeps '{:paths ["src"]}' -x not-user/foo
bar
filipesilva@m4 ~/r/s/bb-user-clj> bb -Sdeps '{:paths ["src"]}' -x user/foo
Could not resolve sym to a function: user/fooI'm able to re-create this. It seems like, having not dug into the code at all yet, the user ns is created by default, and then any additions from a user.clj aren't loaded. They can be brought in with :reload, but that's a little awkward using -x:
user=> (foo 1)
clojure.lang.ExceptionInfo: Could not resolve symbol: foo [at <repl>:1:1]
user=> (require '[user] :reload)
nil
user=> (foo 1)
bar
nil
It's also different behavior from clj -X, so IMO, it'd be a good candidate for a GH issue.sgtm, here it is https://github.com/babashka/babashka/issues/1867
thanks for trying to repro btw