Sometimes it is preferable and time-saving to retest :only failed tests,
instead of retesting the entire namespace.
To enable this, we can write a map to .lein-failures like this:
{"failed-ns-1" ["failed-test-1" "failed-test-2"]
"failed-ns-2" ["failed-test-1"]
... ... ...}
But we do NOT change the API or behaviour of `lein-retest`.
We only modify it to read namespace names from a map instead of a set.
We now have the option to write a custom plugin or wrapper that retests
only failed tests.
Upgrade/downgrade are "primitive" tasks that must be implemented in the
shell script for bootstrapping reasons. We have a dummy task just for
the purposes of having somewhere to hang a docstring; this commit adds
the alias for downgrade.
Fixes#1947
Bumping HttpWagon from 2.4 to 2.6 caused old methods in HttpWagon to
disappear, and along with it all the old Apache Http stuff we depended
on. This caused additional CA certificates provided in :certificates to
make Lein just fall on the floor and die.
This bumps HttpWagon to 2.9 and refactors Apache Http usage to
non-deprecated usage for the version we depend on.
While trying to develop a Leiningen plugin I stumbled over two small
things, which I think make other people stumble as well:
- Adding the path to my plugin's src directory to .lein-classpath
didn't help anything. Leiningen still loaded the coded that I had
installed to the Maven repository and ignored the local changes.
Putting :provided or :resolve or :classpath after the plugin
coordinates as suggested in issue #750 didn't help either. After
banging my head against this, I got the idea to remove the plugin
entry completely and it worked. Not sure if this is the intended
behaviour, though. Add a step-by-step guide to getting what you want
anyway.
- It wasn't at all clear to me how to do the subtasks thing. The
sentence about the :subtask metadata is a bit garbled and I thought
there might be a mechanisms that invokes subtasks for me. I couldn't
find anything about that, though. A quick search took me to
https://github.com/devth/lein-worker/blob/master/src/leiningen/worker.clj,
which showed the relevant bits. Add an example, because that's what
people understand.
Discussion:
- The new place of the paragraph for emitting output is not very good,
but it's better than leaving it at the bottom of the newly expanded
local development section, where nobody would see it.
- Renaming "Documentation" to "Documentation and subtasks" is a rather
thin patch. – Instructions on how to invoke subtasks don't really
belong in a section about documentation. – However, I'm too lazy to
do a lot of restructuring and I think people will still find what
they're looking for.
Clojure 1.7.0 will add support for reader conditionals:
http://dev.clojure.org/display/design/Reader+Conditionals
This patch adds reader conditional support to leiningen, in particular for
compilation (including aot and stale files) and testing.