witty-crayon-22786
12/06/2018, 8:03 PMwitty-crayon-22786
12/06/2018, 8:05 PMcls._options
field, and 2) the static/cls requests for Subsystem instances aren't concurrency safewitty-crayon-22786
12/06/2018, 8:06 PMwitty-crayon-22786
12/06/2018, 8:06 PMwitty-crayon-22786
12/06/2018, 8:07 PMwitty-crayon-22786
12/06/2018, 8:08 PMclass ListOptions(Subsystem):
"""Lists all targets matching the target specs.
If no targets are specified, lists all targets in the workspace.
"""
options_scope = 'list'
@classmethod
def register_options(cls, register):
+--- 9 lines: super(ListTargets, cls).register_options(register)-----------
def __init__(self, options):
super(ListTargets, self).__init__(*args, **kwargs)
self._provides = options.provides
self._provides_columns = options.provides_columns
self._documented = options.documented
@rule(ListOptions, [])
def list_options():
scoped_options = yield Get(ScopedOptions, Scope(str(ListOptions.options_scope)))
return ListOptions(scoped_options)
witty-crayon-22786
12/06/2018, 8:12 PMwitty-crayon-22786
12/06/2018, 8:16 PMscope
as a known scope, 2) the register function, 3) the object to hold the resultswitty-crayon-22786
12/06/2018, 8:28 PMwitty-crayon-22786
12/06/2018, 8:29 PMwitty-crayon-22786
12/06/2018, 9:05 PMOptionable
for this usecasewitty-crayon-22786
12/06/2018, 9:06 PMwitty-crayon-22786
12/06/2018, 9:17 PMglobal_instance
and scoped_instance
an options
parameter that bypasses subsystem initialization and singletonism. cc @happy-kitchen-89482happy-kitchen-89482
12/06/2018, 9:53 PMwitty-crayon-22786
12/06/2018, 9:55 PMwitty-crayon-22786
12/06/2018, 10:25 PMwitty-crayon-22786
12/06/2018, 10:26 PMwitty-crayon-22786
12/06/2018, 10:26 PMglobal_instance
and scoped_instance
methodswitty-crayon-22786
12/06/2018, 10:27 PMwitty-crayon-22786
12/06/2018, 11:03 PMaloof-angle-91616
12/06/2018, 11:55 PMaloof-angle-91616
12/06/2018, 11:55 PMhappy-kitchen-89482
12/07/2018, 1:52 AMhappy-kitchen-89482
12/07/2018, 2:21 AMwitty-crayon-22786
12/07/2018, 2:53 AM--no-v1 --v2
split isn't quite working, but it's hackweek. this is a complete replacement for the ListTargets goal: https://github.com/pantsbuild/pants/pull/6880aloof-angle-91616
12/07/2018, 2:59 AM@console_rule('list', [Select(Console), Select(ListOptions), Select(Specs)])
this is **********ing absurdwitty-crayon-22786
12/07/2018, 3:00 AMaloof-angle-91616
12/07/2018, 3:00 AMlist
? what do i need to do that? it's all right therewitty-crayon-22786
12/07/2018, 3:00 AMSelect
wrapper at this point tooaloof-angle-91616
12/07/2018, 3:00 AM