Remove the global codegen strategy

Review Request #2985 - Created Oct. 17, 2015 and submitted

Information
Stu Hood
pants
2337, 2386
b86b29e...
Reviewers
pants-reviews
fkorotkov, gmalmquist, tejal, zundel

I'd noticed a few issues with versioned target invalidation, first in antlr and then in the newly ported scrooge task. Now that all consumers are ported to isolated codegen, we can fix and prevent those issues by switching away from the manual caching strategy.

  • Drop codegen strategies entirely
  • Detect duplicate sources using the synthetic targets, rather than re-scanning the workdirs
  • Prune duplicate sources from disk when they are "allowed", to avoid having to deal with them in subsequent incremental runs
  • Deprecate but preserve the strategy flag
  • Enable cache_target_dirs for simpler/more-correct caching/invalidation
  • In test_simple_codegen_task: move DummyTask and DummyTarget to top level classes in order to add the ensure_cached annotation

https://github.com/pantsbuild/pants/pull/2386

For a context containing 1549 gen targets, the time to execute the task improves signficantly:

Clean:
  Before: 777 seconds
  After: 220 seconds
Noop:
  Before: 25 seconds
  After: 12 seconds
Eric Ayers
Stu Hood
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 8f89227bcb85206128f86af088b7f595b835c672

Loading...