Handle case where only transitive dependencies have changed during an incremental build
Review Request #3028 - Created Oct. 23, 2015 and submitted
|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_diras the previous attempt. In that case, we were seeing an error (rightly, as it was an unexpected case) because the previous
results_dirhad not been initialized.
- Work around the bug by always initializing
previous_results_dir, even if it would be the same as the current
- 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:
Fix import error.
Revision 2 (+58 -21)