Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.deps by

At work, we have four or five JVM options that are common to almost every invocation of the CLI via aliases in our deps.edn file. Currently, we have :jvm-opts duplicated into each alias.

It would reduce duplication if we could just say :jvm-opts :common-opts in each alias and have a :common-opts alias that specified the JVM options in just one place or, even better, if the :jvm-opts vector could take a mix of keywords and strings and look up the keywords as aliases and merge that data in.

This would make :jvm-opts consistent with :paths and :extra-paths and help reduce duplication in deps.edn files.

In our specific case, we could then do the following:

;; under :aliases
:common-jvm-opts ["-Dclojure.core.async.go-checking=true"
                  "-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"
                  "-XX:-OmitStackTraceInFastThrow"
                  "--illegal-access=warn"]}

;; in a specific alias
:some-alias {
  :jvm-opts [:common-jvm-opts "-Dlogged-future=synchronous"]
}

1 Answer

+1 vote
by
selected by
...