clean up deprecated global_subsystems and task_subsystems

Review Request #4349 — Created Nov. 2, 2016 and submitted


global_subsystems and task_subsystems class methods in Task are deprecated by subsystem_dependencies. This patch converts usages of global_subsystems and task_subsystems to subsystem_dependencies and removes the hacky logic in

There is another global_subsystems logic in plugin level. I didn't remove it in this patch for the following reasons:
1. contrib/README explicitly tells developer to use this way to declare plugin level subsystems, thus to deprecate it, we may want to go through a deprecation cycle.
2. Some plugins does not have tasks, but only targets, an example is internal_backend.utilities. In this case, if I remove global_subsystems in, then there is nowhere to add this dependencies.
3. I have noticed that subsystemss defined in contrib/node/src/python/pants/contrib/node/subsystems/resolvers/ have dependencies on contrib/node/src/python/pants/contrib/node/task:, which means, if I move the subsystem_dependencies() into task level, a circular dependency case will happen, causing import error.

Thus I think it is out of scope of this review. If we want to deprecate plugin level global_subsystems in the future, we have to refactor pants a bit to address the above.

  1. Thanks for fixing this up.

Review request changed

Status: Closed (submitted)

Change Summary:

Merged as
Thanks Benjy!