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.
Make LegacyAddressMapper v2 engine backed
When testing v2 engine in OSS pants master, I found that LegacyAddressMapper is missing a scan_build_files method which is used in v1 BuildFileAddressMapper, thus causing some test failures. In addition, LegacyAddressMapper internally relies on LegacyBuildGraph to do things. This dependency is unnecessary. This change adds the missing method to LegacyAddressMapper, and implements all methods of LAM using v2 engine directly. A summary of this review: 1. Implement "scan_build_files" on LegacyAddressMapper. As part of the effort, add a new selection_request method in LocalScheduler class. 2. Modify all other methods of LegacyAddressMapper to use v2 engine directly, and remove the dependency on LegacyBuildGraph. 3. Remove "resolve_spec" method in AddressMapper base class, replace with a new method called "check_valid_spec", which will check if input spec is valid or not. This suffices the only use case of resolve_spec in master without returning an unused TargetAddressable. 4. Add a new "resolve_address" method in BuildGraph, which will replace the usage of "address_mapper.resolve" in master. This is done to unify the behavior between v1 and v2 engine, since in v2 engine, only LegacyBuildGraph has instantiated target objects (ProductGraph only has TargetAdaptor). 5. Modify test cases for LegacyAddressMapper 6. Add some missing dependencies in several BUILD files. 7. Fix a bug in go_buildgen() Testing Done: https://travis-ci.org/pantsbuild/pants/builds/163454699 Bugs closed: 3871, 3875 Reviewed at https://rbcommons.com/s/twitter/r/4239/
- Loading branch information
Showing
19 changed files
with
318 additions
and
177 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
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
Oops, something went wrong.