clean up deprecated global_subsystems and task_subsystems

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

Information
Yujie Chen
pants
4019
Reviewers
pants-reviews
benjyw

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 subsystem_client_mixin.py.

Note:
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 register.py, 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.

https://travis-ci.org/pantsbuild/pants/builds/172743050

Benjy Weinberger
Yujie Chen
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as https://github.com/pantsbuild/pants/commit/1e45167fab9a30f32207d025d91d2a071c8981fe.
Thanks Benjy!

Loading...