This will break when you do crazy stuff like:
$ lein trampoline do with-profile production compile, repl
but it's better than the old behaviour.
Fixes#1277.
0 arg task arglist was printing as `""` since passing `[project]` to
`next` resulted in `nil` which prints as `""`. Used `(comp vec next)`
instead to force it into `[]` which prints as `"[]"`.
This dependency pulls in a number of other dependencies which we don't
use but which are difficult for downstream packagers to deal with.
Include our own version of map-vals (because seriously, why is this
not already part of Clojure) and update-first (because re-forming
those problems without it crazy convoluted). But our implementation is
a fair bit shorter because it doesn't have to handle all the edge
cases.
Whenever composite profiles were added to project maps, their children
were also attached as active profiles. This confuses `with-profile` and
profile merging task where excluded profiles only remove the name of the
composite profile, not the subprofiles. This allows uberjar to exclude
the default profile without excluding subprofiles, without excluding
active subprofiles themselves.
So these task actions now produce sensible results:
`lein with-profile +dev uberjar` -> uberjar with dev-dependencies, but
without the other default profiles
`lein -U uberjar` -> uberjar with snapshot updates, but not with any
default dependencies added.
Fixes#1233.
This seem to handle #1233 correctly, but breaks a pom test. I assume
there's some part of the merge logic I've forgotten, so feel free to
peek around and comment on what I've currently done.
When the default behavior for `:jvm-opts` is additive, it can lead to
unexpected results if a project tries to add its own options which
conflict with the defaults. For example, the following setting:
:jvm-opts ["-XX:-TieredCompilation"]
Results in a JVM command line like this, in which the project's JVM
options are overridden by the defaults:
-XX:-TieredCompilation -XX:+TieredCompilation -XX:TieredStopAtLevel=1
By setting :displace metadata on the default :jvm-opts, any project
configuration of :jvm-opts will replace the defaults.