Improved artifact cache usability

Review Request #2449 - Created July 9, 2015 and submitted

Information
Cody Gibb
pants
57643d6...
Reviewers
pants-reviews
benjyw, patricklaw, stuhood, zundel

Provided a simpler interface for caching, which tasks may opt into: each VersionedTarget (VT) is given a directory in which to place its results, so when executing some task on invalid VersionedTargets, the task may place the artifacts of a VT within its corresponding directory. The act of writing the VT / artifact files to the cache is factored out of individual tasks, and is done "automatically" by Task->execute.

Implemented the above functionality in various tasks to showcase various use cases (CppBinaryCreate, CppCompile, CppLibraryCreate, Checkstyle, Scalastyle, JarCreate). Note: this interface only works on isolated strategies, not global.

Wrote a test utility for verifying arbitrary unit tests are caching results.

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

Added C++ integration tests for caching, and applied above mentioned test utility to various tests to verify caching.

Note: There was an issue with Antlr unit tests, which began to fail when using the artifact cache. These tests were disabled: see lengthy comment in tests/python/pants_test/backend/codegen/tasks/test_antlr_gen.py for more details.

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Stu Hood
Eric Ayers
Eric Ayers
Stu Hood
Stu Hood
Cody Gibb
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as b2202480258b6f2f5f4e020e86cde975088c7792

Great work!

Loading...