Classpath isolation: make ivy resolution locally accurate.

Review Request #2064 - Created April 11, 2015 and submitted

Information
David Turner
pants
4bd203a...
Reviewers
pants-reviews
benjyw, jsirois, stuhood
In the global compilation strategy, the 'compile_classpath' product
contains a list of artifacts for each target.  This list need not be
accurate per-target so long as the total set of artifacts required for
the build is included somewhere in the product.  In ivy resolution, a
target T might request library L, version 1.0.  If some other target U
in the build brings in L 2.0, Ivy might not resolve L 1.0's
dependencies.  So, prior to this patch, the compile_classpath for T
would show L, but not L's dependencies.

In the isolated compilation strategy, compile_classpath must be
accurate per-target, since targets will be built independently.  So
if T were missing L's dependencies, T might not be buildable.

This patch solves this problem by ignoring version numbers when
retrieving dependencies, so that the resolved version can replace
the requested version in all cases.

Note that ivy resolution is still not 100% isolated; if T is built in
the same compile as U, it will be built against L 2.0, while if it is
built alone, it will be built against L 1.0.

CI green: https://travis-ci.org/pantsbuild/pants/builds/58371122

Issues

  • 0
  • 4
  • 0
  • 4
Description From Last Updated
John Sirois
John Sirois
John Sirois
David Turner
Nick Howard (Twitter)
David Turner
Stu Hood
David Turner
John Sirois
John Sirois
David Turner
John Sirois
David Turner
John Sirois
David Turner
John Sirois
David Turner
Review request changed

Status: Closed (submitted)

Change Summary:

a1ce39bfa437ab4537fcb6af498a66539aac5f5a

Loading...