With leiningen
, it is possible to reconfigure global vars within a profile [1].
This was convenient to enable options like *warn-on-reflection*
for a whole module only during special stages like tests.
Looking for the same with Clojure CLI, I could not find an explicit way to do so.
Looking at various commands like compiling clojure code that requires the following clojure -M -e "(compile 'some.namespace)"
, it is possible that I have to resort to a similar trick.
For the record, various sources like [2] suggest to put it in each file, but it is quite cumbersome.
[1] https://github.com/technomancy/leiningen/blob/6c8cdeebb07972f2a24b95bfc64b339c9895d3bc/sample.project.clj#L285-L290
[2] https://github.com/clj-easy/graal-docs#reflection