Ran into a strange thing today: I have a namespace that defines a function format
; it has (:refer-clojure :exclude [format])
, it works when run from a regular REPL, it works when run in tests (the ns required :as sut
and then sut/format
). But via Chlorine, it seems to think format
is clojure.core/format
. I can't run (format ...)
in my ns because Chlorine seems to run (clojure.core/format ...)
and even when I try to run the tests, it seems to think sut/format
doesn't exist...
that is strange
Yeah, I'm real puzzled. Not sure what's going on there.
I've tried it on two Chlorine setups: macOS and Windows+WSL. Same weird behavior.
@seancorfield i get the same issue on linux fwiw
i tried explicitly evaluating in-ns
as well before evaluating a custom format
defined in an ns with (:refer-clojure :exclude [format])
even using a fully qualified symbol (e.g. my-ns/format
) yields the same results
i suspect unrepl is up to something 🙂
Yeah, it's weird because in another ns it seems to be okay to define format
😐
Wow, strange indeed. I'll look at it right now
Seems like a bug. Probably on my part, really...
Right, found out. To avoid more bizarre errors, I was using ns
instead of in-ns
before running any code on specific namespace. But it seems that its behavior is quite bizarre when a namespace already exist 😞
Fixing here: https://github.com/mauricioszabo/repl-tooling/pull/94
Cool. I just went to check how it would behave in the namespace-not-existing case and see you've preserved that behavior. Thanks for the quick fix!
Yes, when the namespace does not exist Clojure sometimes give such a strange error that's hard to explain what's happening...
Thanks for the quick fix on that @mauricio.szabo -- I can confirm that my format
issue has gone away now 🙂
worked here too :)
i apologize to the unrepl gods