Kill goal dependencies.

Review Request #1577 — Created Jan. 7, 2015 and submitted

jsirois
pants
jsirois/engine/kill_goal_deps
917, 918
d3c01d6...
pants-reviews
benjyw, ity, zundel
These have not been used since the new options system went in and only cause confusion.
This change strips uses in pants itself but keeps the TaskRegistrar parameter around
for a deprecation cycle, printing a warning to those still using the now-ignored parameter.

 examples/src/python/example/pants_publish_plugin/register.py |   1 +
 src/python/internal_backend/optional/register.py             |   9 +---
 src/python/pants/backend/android/register.py                 |  12 ++---
 src/python/pants/backend/codegen/register.py                 |  15 ++----
 src/python/pants/backend/core/register.py                    |  88 ++++++++++++++-----------------
 src/python/pants/backend/jvm/register.py                     | 140 ++++++++++++++++++--------------------------------
 src/python/pants/backend/python/register.py                  |  24 ++-------
 src/python/pants/goal/goal.py                                |   6 +--
 src/python/pants/goal/task_registrar.py                      |  26 ++++++++--
 9 files changed, 127 insertions(+), 194 deletions(-)

I left 1 dep laying about to double-check the warning look & feel:

$ pants.dev test tests/python/pants_test/base:: --print-exception-stacktrace
*** Running pants in dev mode from /home/jsirois/dev/3rdparty/jsirois-pants2/src/python/pants/bin/pants_exe.py ***

WARNING: Registered dependencies are now ignored and only `Task.product_types`
and product requirements as expressed in `Task.prepare` are used to
infer Task dependencies.

Please fix this registration:
  TaskRegistrar(python-binary-create, <class 'pants.backend.python.tasks.python_binary_create.PythonBinaryCreate'> serialize=True)
    File "/home/jsirois/dev/3rdparty/jsirois-pants2/src/python/pants/backend/python/register.py", line 47, in register_goals
    dependencies=['bootstrap', 'resources']).install('binary')

16:19:43 00:00 [main]
               (To run a reporting server: ./pants server)
...

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

IT
  1. lgtm - thanks for the cleanup!

    1. Added purposefully to get 2 blank lines between imports top-level functions/classes.

  2. 
      
JS
JS
  1. This actually broke the ListGoals Task. It uses Goal.dependencies to emit a dot graph. I'll look at fixing this but may kill the Task then resurrect depending on complexity / ugliness of this - the logic to build the graph is now only in RoundEngine.

  2. 
      
ZU
  1. 
      
  2. 
      
BE
  1. Thanks for cleaning this up!

  2. src/python/pants/goal/task_registrar.py (Diff revision 1)
     
     

    Neat!

  3. 
      
ST
  1. Ship It!
  2. 
      
JS
JS
JS
JS
  1. Thanks folks - submitted @ https://github.com/pantsbuild/pants/commit/e1deb52f98492921c958c6590153ce0b4d33961c

  2. 
      
JS
JS
Review request changed

Status: Closed (submitted)

TE
  1. Ship It!
  2. 
      
Loading...