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.
Restore Sources custom types per extension.
This was removed to support the multiprocess engine which relies on pickling. The dynamic class objects generated by `Sources.of` were not pickle compatible. Restore `Sources.of` memoized Sources subtypes per-extension by implementing `__reduce__` and exposing the `Sources` subtypes at the module level. Testing Done: REPL testing to both check quickly pickle/unpicle now worked and type identity was maintained. This was backed up by the engine test which pickles and unpickles `Sources` as part of running the multiprocess engine. Also re-rendered the simple codegen plan, make more sense now that the Sources product type carries the extension - see attached and compare to the image in https://rbcommons.com/s/twitter/r/3010/: ``` $ ./pants run src/python/pants/engine/exp/examples:viz -- \ tests/python/pants_test/engine/exp/examples/scheduler_inputs \ compile src/java/codegen/simple ``` CI went green here: https://travis-ci.org/pantsbuild/pants/builds/86753888 Bugs closed: 2423 Reviewed at https://rbcommons.com/s/twitter/r/3011/
- Loading branch information
Showing
4 changed files
with
31 additions
and
20 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