Hey, I am toying around with tools.build and encountering the following problem: If I def something which depends on env variables, it crashes, because the def is apparently evaluated. I did not encounter this behaviour, when using depstar for the same code. Is there any possiblity to disable evaluation of some global variables?
Or am I misunderstanding something fundamentally?
If you are compiling, then you are loading, and top level defs get evaluated
A common technique is to use delay and then deref when you use the value
Yeah, you’re right. Its the compile step. I assume there is no way to have certain files included as .clj without compiling them in the uberjar?
You choose what gets compiled, but I think would fix the problem.
Thanks, will try it out 🙂
I am currently using the uberjar template from the tools.build documentation