Handle case where only transitive dependencies have changed during an incremental build

Review Request #3028 - Created Oct. 23, 2015 and submitted

Information
Stu Hood
pants
2447
921d5ed...
Reviewers
pants-reviews
benjyw, nhoward_tw, patricklaw

Because of #2446, when you add and remove a dep from a target in succession for a task that uses transitive invalidation, it's possible for an incremental compile to occur in the same results_dir as the previous attempt. In that case, we were seeing an error (rightly, as it was an unexpected case) because the previous results_dir had not been initialized.

  • Work around the bug by always initializing previous_results_dir, even if it would be the same as the current results_dir
  • Add a test that doesn't quite reproduce the issue, and expect it to fail

Fixes:

compile(src/scala/org/pantsbuild/zinc:zinc) failed: There is no previous_results_dir for: VT(src.scala.org.pantsbuild.zinc.zinc, invalid)

expected to go green:
https://travis-ci.org/pantsbuild/pants/builds/87097649

Stu Hood
Stu Hood
Patrick Lawson
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as daf33dbf6e4dec679826e0486344bd6fb51758af

Loading...