Fork me on GitHub

That's helpful, thank you. And it seems ( &env) is nil when shadow is watching a build and hot reloading a namespace, is that expected?


Actually i'm sometimes getting nil values for ( &env) inside macros, even when doing a release build. it's almost like there is some kind of compliation pass that happens which causes macroexpansion before the build environment is set. I also noticed that there are some macroexpansions that happen before the :configure stage of hooks are called.


there can be no macro expansions before :configure. well unless those macros are in .cljc and you do anything in CLJ?


needless to say it is only set for CLJS compilation. otherwise it won't be present, but it should always be present for CLJS code?


Yeah it is in a cljc file, and i have some toplevel constants that are set to like (def foo (my-macro)). in those cases, could my-macro be being called with nil build-mode and before the :configure stage?


there is absolutely no CLJS compilation happening before :configure so no