First pass at dependency management implementation.

Review Request #3336 - Created Jan. 14, 2016 and submitted

Information
Garrett Malmquist
pants
gmalmquist/dependency-management
2804
Reviewers
pants-reviews
benjyw, nhoward_tw, patricklaw, stuhood, zundel

See the design doc for context:

https://docs.google.com/document/d/1AM_0e1Az_NHtR150Zsuyaa6u7InzBQGLq8MrUT57Od8/edit#

This patch introduces a JarManagedDependencies target, and a
DependencyManagement subsystem.

A managed_jar_dependencies() target contains a single heterogenous
artifacts list of jar() objects and specs for jar_libraries.

A jar_library can reference a single managed_jar_dependencies target,
or else use the default target specified in the
JarDependencyManagement subsystem. This will be used to pin the
versions of artifacts that library includes during the ivy_resolve.
This applies to artifacts the jar_library declares directly, as
well as transitive external artifact dependencies.

If a jar() object in a jar_library declares no version, the pinned
version from its corresponding jar_dependency_management is used. If
there is no pinned version, the default behavior of resolving the
newest version available is used.

If a jar() object in a jar_library declares a version that
conflicts with what is set in jar_dependency_management, the resulting
behavior is configurable with the --conflict-strategy option. By
default, an exception is raised.

In the next pass I will implement full support for using multiple
managed_jar_dependencies targets in the same repo, which will require
partitioning ivy resolves by artifact sets, and computing artifact
sets from managed_jar_dependencies using the union of all
managed_jar_dependencies in their transitive closure.

Added tests to:

tests/python/pants_test/backend/jvm/subsystems/test_dependency_management.py
tests/python/pants_test/backend/jvm/subsystems/test_dependency_management_integration.py
tests/python/pants_test/backend/jvm/tasks/test_dependency_management_setup.py

CI went green here: https://travis-ci.org/pantsbuild/pants/builds/102408837
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/102623512
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/102685461
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/103393108
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/103417409
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/103465228
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/103882366

Issues

  • 0
  • 22
  • 5
  • 27
Description From Last Updated
Garrett Malmquist
Eric Ayers
Garrett Malmquist
Nick Howard (Twitter)
Garrett Malmquist
Nick Howard (Twitter)
Garrett Malmquist
Garrett Malmquist
Nick Howard (Twitter)
Garrett Malmquist
Garrett Malmquist
Benjy Weinberger
Garrett Malmquist
Garrett Malmquist
Nick Howard (Twitter)
Garrett Malmquist
Nick Howard (Twitter)
Benjy Weinberger
Garrett Malmquist
Eric Ayers
Garrett Malmquist
Eric Ayers
Garrett Malmquist
Garrett Malmquist
Review request changed

Status: Closed (submitted)

Change Summary:

In 8aacb2b037837c21db972d2914b1e2fa935e070d. Thanks Nick, Eric, and Benjy! (And everyone who chimed in on the design doc).

Loading...