Fixup Dependencies to be mainly target-type agnostic.

Review Request #920 - Created Aug. 19, 2014 and submitted

Information
John Sirois
pants
jsirois/dependencies/fix
499, 501
Reviewers
pants-reviews
jcoveney, lahosken, patricklaw, zundel
commit 4a6cc896587e820389019ce2e70d0dfaa8df4757
Author: John Sirois <jsirois@twitter.com>
Date:   Tue Aug 19 09:25:49 2014 -0600

    Fixup Dependencies to be mainly target-type agnostic.
    
    The only dependency now is a mapping of known payload
    types that represent external dependencies.
    
    Expand the unit test and improve it to verify ordering.

 src/python/pants/backend/jvm/tasks/dependencies.py | 82 +++++++++++---------------------------------------
 src/python/pants/base/build_graph.py               |  2 +-
 tests/python/pants_test/tasks/test_base.py         | 13 ++++++--
 tests/python/pants_test/tasks/test_dependencies.py | 75 +++++++++++++++++++++++++++------------------
 4 files changed, 75 insertions(+), 97 deletions(-)
$ PANTS_DEV=1 ./pants goal test tests/python/pants_test/tasks:dependencies --test-pytest-options=-v
...
09:27:02 00:01   [test]
09:27:02 00:01     [pytest]
09:27:02 00:01       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.6.9 -- py-1.4.23 -- pytest-2.6.1 -- /usr/bin/python2.6
                     plugins: cov, timeout
                     collected 9 items 
                     
                     tests/python/pants_test/tasks/test_dependencies.py::DependenciesEmptyTest::test_no_targets PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::NonPythonDependenciesTest::test_all_dependencies PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::NonPythonDependenciesTest::test_dep_bag PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::NonPythonDependenciesTest::test_external_dependencies PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::NonPythonDependenciesTest::test_internal_dependencies PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::NonPythonDependenciesTest::test_without_dependencies PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::PythonDependenciesTests::test_external_dependencies PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::PythonDependenciesTests::test_internal_dependencies PASSED
                     tests/python/pants_test/tasks/test_dependencies.py::PythonDependenciesTests::test_normal PASSED
                     
                     ============ 9 passed in 0.20 seconds ============
                     
09:27:31 00:30     [junit]
09:27:31 00:30     [specs]
               SUCCESS

Travis CI went green here: https://travis-ci.org/pantsbuild/pants/builds/32980244

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
John Sirois
Jonathan Coveney
John Sirois
Eric Ayers
Larry Hosken
John Sirois
John Sirois
John Sirois
John Sirois
Eric Ayers
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Patrick Lawson
Sorry for the late review--lgtm!  Definitely better than what we had, but I agree with your comment that we still need a general notion of how to ask a Target if it represents externalized payload.
Loading...