leiningen

Joel 2024-11-14T16:07:47.253849Z

If I have a simple (prn "HELLO WORLD") (not in a function) in one of my .clj files, should I expect to see that when I run lein jar? I am seeing that, but I thought lein jar would only compile.

Alex Miller (Clojure team) 2024-11-14T17:16:17.630459Z

Compile is a side effect of loading

Alex Miller (Clojure team) 2024-11-14T17:16:43.465819Z

All namespaces being compiled are thus loaded and top level effects will be seen

1
Alex Miller (Clojure team) 2024-11-14T17:17:56.434159Z

Generally the best practice should be to have no eager top-level side effects (use delay or push work into functions)

👍 1
👍🏼 1