Update the dependencies returned from ivy to be in a stable (sorted) order.

Review Request #3168 - Created Nov. 24, 2015 and submitted

Information
Eric Ayers
pants
zundel/sort-deps-by-caller
2607, 2618
b50c5b4...
Reviewers
pants-reviews
gmalmquist, jsirois, nhoward_tw, stuhood

Reproduces a root cause of slow compiles noticed at Square.

The resolution report from Ivy doesn't return the deps from a target in a stable order. In one case, we get the dependencies of the jetty-jsp dep which lists jetty-schema before servlet-api. In another case it reverses the order of those two deps.

This causes the classpath to be ordered differently when compiling different targets, causing unecessary cache invalidation, and possibly different results when compiling transitive dependencies. To resolve this, we will sort dependencies alphabetically to insure a stable ordering.

CI is green at https://travis-ci.org/pantsbuild/pants/builds/93252409

Tried this in our local build. Its an improvement in the number of transitive deps that need to be recompiled when 2 targets share a lot of commone deps. In one instance, it prevented 67 targets from being recompiled and decreased build time by 4 minutes (was 9 minutes)

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Garrett Malmquist
Stu Hood
Eric Ayers
Eric Ayers
Garrett Malmquist
Stu Hood
Eric Ayers
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks for the reviews Stu and Garrett. Commit bde7731

Loading...