@colinkahn there can be subtle issues with this due to timing of compilation and when the global-vars are actually set. Where are you trying the (println "*assert* =" *assert*) ?
I’ve seen a problem come up frequently if you have a user.clj ns that does any sort of :require of your own ns’s, like:
(ns user (:require [one.of.your.nses]))If you do something like that in the user ns, those require/loads will be done before lein has a chance to actually set hte :global-vars.
I don’t know of anything special for run. You could try another task to see if you see the same - like test
I think I’d need to see your project structure + code that you were trying to println with to have much more understanding of your situation
@mikerod sorry I haven't replied. I'll see if I can narrow down the issue this week. It could just be something about our setup, it's quite a complicated project.clj as is now.
Ok. Yeah, no problem. Just let me know if you end up having any details that are shareable.
@mikerod yes, it's possible that is happening with. I had put the println in the top of a namespace that could have been loaded by user.clj. I tried putting it instead in a function that is called during an api call, but I still see *assert* having the value true. Just to clarify, I can put :global-vars at the top level or within a profile?
It can be top level or profile. Shouldn't matter assuming you are actually using the profile
What lein task are you running when you do not see the assert value you expect?
I'm doing lein run