forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support caching chroots for reuse across pants runs.
- 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. Testing Done: CI passes: https://travis-ci.org/pantsbuild/pants/builds/66601000. Bugs closed: 1669 Reviewed at https://rbcommons.com/s/twitter/r/2349/
- Loading branch information
Showing
9 changed files
with
142 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters