This commit fixes#2205: when using managed dependencies in
a project, if the project itself was a non-SNAPSHOT version,
then when `lein install` and similar tasks were executed,
lein would check to make sure that none of the dependencies
were a SNAPSHOT version. lein was checking that directly against
the `:dependencies` vector, which would cause an NPE if a dependency
didn't specify a version number (because it was inheriting it from
the `:managed-dependencies` section).
This commit fixes the bug by calling the code that merges the
`:dependencies` and `:managed-dependencies` vectors together prior
to performing the SNAPSHOT check.
GitHub usernames only allow alphanumeric characters and single hypens.
This commit fixes the regex to allow dashes, and remove _ as _ aren't
valid in Github usernames.
Adds lein.ps1 as a more maintainable, elegant integration for Windows,
with small changes to lein.bat to support it, and lein.cmd as an example
of a minimalist lein.ps1 launcher.
This commit clarifies some things in the docs based on PR review.
It also adds additional test coverage for managed dependencies;
specifically, a case where two normal dependencies both have
a transitive dependency on the same library, but with different
versions. The test validates that this conflict is properly
resolved via `:managed-dependencies`.
In certain cases (e.g. reading a project.clj file out of a jar,
rather than from a file on disk) it is useful for the `read`
and `read-raw` functions to support being passed a `Reader` object,
rather than a File or path.
This commit modifies the `read-raw` function to support being
passed a Reader. It also modifies the `defproject` macro to
avoid the assumption that `*file*` will always have a non-nil
value, because that assumption causes an NPE in the case where
a Reader is the source of the project definition.
This commit adds some additional dependencies to the test project
file for managed dependencies, and significantly increases the
coverage of the tests.
This commit deprecates the `resolve-dependencies` function in
favor of `resolve-managed-dependencies`. It also conditionally adds
the `:managed-dependencies` key to the execution of the deprecated
function, in hopes of improving backward compatibility for cases
where people are still calling the deprecated version.
It also cleans up a few docstring "TODO"s and adds real docstrings.
This commit provides initial support for `managed-dependencies`,
where dependency version numbers may be specified in a separate
section called `managed-dependencies`, and those version numbers
will be used for any deps in the main `dependencies` section
that do not explicitly specify a version number.
This is a precursor to being able to specify a "parent" project
that could be used to consolidate version numbers of common
dependencies across a large number of libraries.