Record the BUILD target alias in BuildFileAddress.

Review Request #2726 - Created Aug. 30, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/2024
2024, 2090
2759, 2730
62b613b...
Reviewers
pants-reviews
fkorotkov, gmalmquist, patricklaw, zundel
This change supports acting on the target alias a BUILD file author
knows instead of target class names they likely don't.

Fallout includes eliminating BuildFileAddress use from most tests
and secondary fallout is modernizing those tests to use make_target.

In order to support targets that utilize traversable_dependency_specs,
make_target is beefed up to emulate more of the standard BuildGraph
behavior parsing in a target from a BUILD file.  This has further
fallout in tests that pass resources to make_target.

 contrib/buildgen/src/python/pants/contrib/buildgen/build_file_manipulator.py |   7 +-
 migrations/options/src/python/migrate_config.py                              |   7 +
 src/python/pants/backend/jvm/targets/jvm_app.py                              |   2 +-
 src/python/pants/backend/jvm/targets/jvm_binary.py                           |   4 +-
 src/python/pants/backend/jvm/targets/jvm_target.py                           |   6 +-
 src/python/pants/backend/project_info/tasks/export.py                        |   3 +-
 src/python/pants/base/address.py                                             |  19 ++-
 src/python/pants/base/addressable.py                                         |   7 +-
 src/python/pants/base/build_configuration.py                                 |   3 +-
 src/python/pants/base/build_file_address_mapper.py                           |   6 +-
 src/python/pants/base/cmd_line_spec_parser.py                                |   6 +-
 src/python/pants/base/target.py                                              |  12 +-
 tests/python/pants_test/BUILD                                                |   1 -
 tests/python/pants_test/backend/jvm/targets/BUILD                            |  58 ++++---
 tests/python/pants_test/backend/jvm/targets/test_jvm_app.py                  | 430 ++++++++++++++++++--------------------------------
 tests/python/pants_test/backend/jvm/targets/test_jvm_binary.py               | 127 +++++----------
 tests/python/pants_test/backend/jvm/targets/test_jvm_target.py               |  28 +---
 tests/python/pants_test/backend/jvm/targets/test_unpacked_jars.py            |  52 +-----
 tests/python/pants_test/backend/jvm/tasks/BUILD                              |  16 +-
 tests/python/pants_test/backend/jvm/tasks/test_checkstyle.py                 |  24 +--
 tests/python/pants_test/backend/jvm/tasks/test_ivy_resolve.py                |  12 +-
 tests/python/pants_test/backend/jvm/tasks/test_prepare_resources.py          |  13 +-
 tests/python/pants_test/backend/jvm/tasks/test_prepare_services.py           |  13 +-
 tests/python/pants_test/backend/jvm/tasks/test_scalastyle.py                 | 282 ++++++++++++++-------------------
 tests/python/pants_test/backend/project_info/tasks/BUILD                     |  13 +-
 tests/python/pants_test/backend/project_info/tasks/test_dependencies.py      |   8 +-
 tests/python/pants_test/backend/project_info/tasks/test_export.py            | 233 ++++++++++++++-------------
 tests/python/pants_test/base/BUILD                                           |  22 +--
 tests/python/pants_test/base/test_address.py                                 |  10 +-
 tests/python/pants_test/base/test_build_file_address_mapper.py               |  55 ++-----
 tests/python/pants_test/base/test_build_file_parser.py                       | 165 +++++++++----------
 tests/python/pants_test/base/test_target.py                                  |  74 ++-------
 tests/python/pants_test/base_test.py                                         |  21 ++-
 tests/python/pants_test/targets/test_unknown_arguments_integration.py        |   5 +-
 tests/python/pants_test/tasks/BUILD                                          |   4 +-
 tests/python/pants_test/tasks/test_group_task.py                             |  62 +++++---
 36 files changed, 753 insertions(+), 1057 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/78071966

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
John Sirois
Eric Ayers
John Sirois
John Sirois
Patrick Lawson
John Sirois
John Sirois
John Sirois
Garrett Malmquist
Eric Ayers
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...