Changes to a native dependency that is not cleaned up will be warned
about to the user. In addition, when a dependency changes, only the
dependencies that actually changed will be checked for native
dependencies, speeding up restart time significantly when you change a
single dependency in a big project.
This fixes the issue with reflection warnings in #2045, but
unfortunately breaks backwards compatibility with 1.1.0. So the lowest
version of Clojure Leiningen now supports is 1.2.0.
Prior to this commit, the `lein release` task was not
really usable for releases that had qualifiers such
as `-alpha1`, `-beta2`, or `-RC1`.
The reason for this is that the code for parsing the
semver could not handle a qualifier like `-alpha1`
AND a `-SNAPSHOT` qualifier at the same time.
The default `:release-tasks` include a `bump-version`
at the `:release` level, and then the release, and
then a `bump-version` at the `:patch` level. If
you had a version that started out as `1.0.0-alpha1` *or*
`1.0.0-alpha1-SNAPSHOT`, then the `:release` bump
would always set the version to `1.0.0`. Then the
actual release would occur, and then the `:patch` bump
would take you to `1.0.1-SNAPSHOT`.
With this commit, `qualifier` and `snapshot` are
separated into two separate fields in the version map.
This allows us to modify the `bump-version` behavior
so that it works as one would expect with a qualifier
like `alpha`:
```clj
(is (= (bump-version "1.0.0-alpha1-SNAPSHOT" :release)
"1.0.0-alpha1"))
(is (= (bump-version "1.0.0-alpha1")
"1.0.0-alpha2-SNAPSHOT"))
```
This allows the default `:release-tasks` setup to be
used with qualifiers like alpha/beta.
The commit also adds a new `level` that can be passed
to the `change` task: `:qualifier`. If this level
is passed, then the qualifier will be incremented
instead of the major/minor/patch. It is a superset
of the existing alpha/beta/RC behavior but works with
arbitrary qualifier strings.
When namespaces use agents during load time, threads
are started in the agent threadpool which take 60 seconds to
end. This adds up to 60 seconds of stall time after the compile
task runs.
This patch checks to see if clojure.core/set-agent-send-off-executor!
exists, and if so, calls it with a Thread pool that has the keep
alive time set to 100 milliseconds.
Technically this could cause Thread churn, but practically most
namespace loading doesn't fire up enough Threads for thread
instantiation costs to add up to much.
Ensures `-XX:-OmitStackTraceInFastThrow` is always included by default
regardless of user's LEIN_JVM_OPTS. This setting can be overridden in
other profiles by the user.
Aliases are higher order, but also attempts to keep track of tasks via
:arglists metadata. The :arglists update function assumed all tasks
would start with a project arg. However, this isn't necessary: A task
may e.g. have the form [& args] and destructure the project arg inside
the function. This caused lein to incorrectly assume that appending more
arguments to the tasks was an error. (The only tasks I know of right now
that does this is mine, so I should probably take the hint)
I also decided to clean up the drop-partial-args function a bit to make
it more readable.
When we expand composite profiles, we may end up with multiple identical
profiles in the resulting list. However, we should only merge a profile
at most once. To fix this, we dedupe the list and retain the _last_
profile mentioned. We retain the last instead of the first as this
prioritises the last profile merges, which is somewhat important for
tasks like repl, uberjar, and to some extent `with-profile +foo`.
It might be interesting to see if we can get away from this in 3.0.0,
for example by saying that
(= (merge-profiles project [:a]) (merge-profiles project [:a :a])).
Fixes#1824 and fixes#2001.
This isn't a perfect solution to error messages, as GPG bypasses the
stdin and sends data directly to the terminal. As such, things from
"stdin" is printed immediately, whereas stderr is printed through the
JVM. As a consequence, it's almost always the case that the stdin lines
are printed before the stderr lines, even though GPG usually sends them
in the opposite order. But it should give you a better indication when
something bad has happened.
Issue #1904 may accidentally be solved as well, as we now have a
shutdown hook on GPG.