Support caching chroots for reuse across pants runs.

Review Request #2349 - Created June 12, 2015 and submitted

Information
Benjy Weinberger
pants
1669
cf8f326...
Reviewers
pants-reviews
jsirois, patricklaw
- Creates huge speedups e.g., when running tests.

- Not turned on for any code yet.  To work safely
  this requires a change to the pex library to support
  creating chroots via copying instead of hard-linking,
  and we're stil waiting on upgrading to a version of pex
  with that change. However this has undergone enough
  "unsafe" testing to verify that it works and provides
  peformance benefits, so I'm submitting it now, to prevent
  it from drifting.

- Incidental changes that this commit required:
  * PythonChroot no longer deletes itself when GC'd. It's generally
    a bad idea to rely on cleanup in __del__ anyway, as there's no
    guarantee it'll ever be called.
  * Simplified some of the interface to PythonChroot. For example,
    you no longer specify an executable name - the chroot creation
    code hard-codes one for you.  The only caller we had for this
    was hard-coding a name anyway, so no real loss of functionality
    there.
  * Modified the backtrace munging trick in python_eval to rely only
    on the parent of the chroot dir, not the chroot dir itself, as
    that is no longer known when we generate the eval's entry point: we need
    to generate that entry point so we can hash it and use that hash
    as input to the function that generates well-known chroot paths.

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

John Sirois
John Sirois
Benjy Weinberger
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as f5933801a899f6d17e94fcba253fbe8ffbc98f1c.

Benjy Weinberger

Thanks John! Submitted as Thanks John!.

Loading...