Fork me on GitHub
#tools-deps
<
2021-06-20
>
thom18:06:31

Is there an equivalent of Leiningen's :global-vars that can be used in a deps.edn file? Is there some more tasteful way to ensure things like *warn-on-reflection* or *unchecked-math* are set everywhere?

practicalli-johnny11:06:41

If these settings are for development only, then I would add this to a user namespace and include the file that contains that namespace on the classpath via an alias. This approach works for either Clojure CLI tools or Leiningen https://practical.li/clojure/clojure-tools/projects/configure-repl-startup.html

borkdude18:06:18

@thom704 there isn't but recently Alex said that "there should" in the #graalvm channel. Currently you can do this like:

clojure -M -e '(set! *warn-on-reflection* true)' -e "(require 'foo.main)" -e "(foo.main/-main)" or so