average-vr-56795
09/26/2019, 4:05 PMconsole_rule
named fmt
conflicts with the scope of the v1 goal named fmt
- we can’t work out how we fixed this for test
, which doesn’t appear to do any magic to avoid this… Anyone know/remember?aloof-angle-91616
09/26/2019, 4:06 PM--v2 --no-v1
should do it?average-vr-56795
09/26/2019, 4:06 PMaloof-angle-91616
09/26/2019, 4:06 PMwitty-crayon-22786
09/26/2019, 4:06 PMaloof-angle-91616
09/26/2019, 4:06 PMaverage-vr-56795
09/26/2019, 4:07 PMfmt
v1 Goal
installedtest
v1 `Goal`…witty-crayon-22786
09/26/2019, 4:07 PM$ rg 'Goal.*fmt'
src/python/pants/core_tasks/register.py
46: Goal.register('fmt', 'Autoformat source code.', FmtTaskMixin.goal_options_registrar_cls)
average-vr-56795
09/26/2019, 4:08 PMtest
goal to legacy
.witty-crayon-22786
09/26/2019, 4:08 PM$ rg 'Goal.*test'
tests/python/pants_test/console_rule_test_base.py
26: """Subclasses must return the Goal type to test.
tests/python/pants_test/task/echo_plugin/register.py
31: Goal.register('echo', 'test tasks that echo their target set',
average-vr-56795
09/26/2019, 4:08 PMaloof-angle-91616
09/26/2019, 4:08 PMaverage-vr-56795
09/26/2019, 4:08 PMwitty-crayon-22786
09/26/2019, 4:08 PMaverage-vr-56795
09/26/2019, 4:09 PMtest
v1 Goal
🙂witty-crayon-22786
09/26/2019, 4:09 PMaverage-vr-56795
09/26/2019, 4:09 PMGoal
uses a custom options registrar class…witty-crayon-22786
09/26/2019, 4:09 PMlint
)average-vr-56795
09/26/2019, 4:12 PMwitty-crayon-22786
09/26/2019, 4:12 PM--transitive
, etc)fancy-motherboard-24956
09/26/2019, 4:21 PMaverage-vr-56795
09/26/2019, 4:24 PMwitty-crayon-22786
09/26/2019, 4:24 PMaverage-vr-56795
09/26/2019, 4:24 PM@union
, but that omits the “there’s some per-union-type options you may want to propagate”witty-crayon-22786
09/26/2019, 4:24 PMaverage-vr-56795
09/26/2019, 4:25 PMwitty-crayon-22786
09/26/2019, 4:25 PMaverage-vr-56795
09/26/2019, 4:25 PMwitty-crayon-22786
09/26/2019, 4:25 PM--jvm-options=..
vs --jvm-mytool-options=
applied recursivelyaverage-vr-56795
09/26/2019, 4:31 PM--fmt-python-skip --no-fmt-java-skip
will they both be injected into the console_rule (so the console_rule needs to be aware of it), or will they be injected into the language-specific rules (so we need every rule to decide whether it should noop, and to return some “I noop’d” value up to the console_rule)witty-crayon-22786
09/26/2019, 4:31 PMfmt
, but they can choose their own scopes for Subsystems--skip
it could go either way: either implemented once, or implemented by a @rule that consumes a scoped subsystem to compute the targets to execute on: yield Get(TargetsToFormat, Scope('black'))
average-vr-56795
09/26/2019, 4:35 PMconsole_rule
, right? Because if it is, the console_rule
needs to know about custom plugins’ Subsystemswitty-crayon-22786
09/26/2019, 4:36 PM--transitive
, it'd probably make sense on the console_rule--skip
, would need to be a Subsystem though I thinkaverage-vr-56795
09/26/2019, 4:38 PM--transitive
we can fix by just deprecating the per-task option and making it a goal optionwitty-crayon-22786
09/26/2019, 4:39 PMaverage-vr-56795
09/26/2019, 4:39 PMwitty-crayon-22786
09/26/2019, 4:39 PMaverage-vr-56795
09/26/2019, 4:42 PMwitty-crayon-22786
09/26/2019, 4:43 PMaverage-vr-56795
09/26/2019, 4:47 PMconsole_rule
kind of requires that information is passed in a structured way from a task-equivalent to a Goal--skip
, at this point…)witty-crayon-22786
09/26/2019, 4:48 PMTargetFilter.scoped_instance(self)
average-vr-56795
09/26/2019, 4:53 PM--skip
too, and recommend target-filter
(with a new “language” or something option) as the replacement, which works really nicely for v2, but would probably be hard to shoehorn into v1 because it would need to implicitly add a subsystem dep to all the tasks in the goal?witty-crayon-22786
09/26/2019, 4:54 PMaverage-vr-56795
09/26/2019, 4:56 PMwitty-crayon-22786
09/26/2019, 4:59 PMoptionable_rule(Subsystem.scoped('blah'))
... but i remember thinking that that might not just workaverage-vr-56795
09/26/2019, 5:05 PM