Commit graph

6 commits

Author SHA1 Message Date
Chris Price
6c69f563f7 (#2216) Fix bug with managed deps in profiles w/:replace
Prior to this commit, profiles with `^:replace` on the dependencies
list would never end up having their dependencies vector normalized
so that it would have `nil` placeholders for the versions of
dependencies that were inheriting their version from `:managed-dependencies`.

This commit normalizes the dependencies vector of a profile during
initialization, to make sure that it will always be normalized.
2016-10-10 18:55:05 -07:00
Chris Price
5bd091a2bf Don't require nil for version in managed deps - fixes #2195
Prior to this commit, if you wanted to use modifiers such as
`:exclusions` or `:classifier` for a dependency whose version you
were managing with `:managed-dependencies`, you would need to
explicitly pass a `nil` as the version string in the dependency
tuple.  This commit adds some logic to coerce the vectors before
they are processed, so that if the version string is simply
omitted instead of being set to `nil`, the `nil` will be implicitly
inserted and things will continue to work as before.

This provides a slightly nicer and more intuitive UX for the
managed-dependencies feature.
2016-09-18 09:21:04 -07:00
Chris Price
3feae04e76 Fix checking for SNAPSHOT deps with managed deps - fixes #2205
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.
2016-09-15 21:12:26 -07:00
Chris Price
7ea847d16f Clarify docs, add tests for transitive deps
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`.
2016-06-30 10:29:18 -07:00
Chris Price
54fda200d7 (#2067) Improve test coverage for managed dependencies
This commit adds some additional dependencies to the test project
file for managed dependencies, and significantly increases the
coverage of the tests.
2016-06-22 14:24:38 -07:00
Chris Price
27782edb2e (#2067) add support for managed-dependencies
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.
2016-06-22 11:20:38 -07:00