https://pantsbuild.org/ logo
h

hundreds-breakfast-49010

12/20/2019, 7:21 PM
does anyone know what would happen if a
@rule
rather than a
@console_rule
returned a
Goal
subclass? would that be detected as a top-level goal?
a

aloof-angle-91616

12/20/2019, 7:22 PM
i don’t think so (and can check) but is that behavior we think we might want?
h

hundreds-breakfast-49010

12/20/2019, 7:22 PM
no, I think it's behavior we don't want, but that might be possible
a

aloof-angle-91616

12/20/2019, 7:22 PM
looking now
yes that is actually the behavior
it only checks if the rule is
cacheable
to see whether it's an
@console_rule
h

hundreds-breakfast-49010

12/20/2019, 7:25 PM
oh, cool, we're doing the right thing then
a

aloof-angle-91616

12/20/2019, 7:30 PM
is cacheable true if and only if it’s a console rule?
h

hundreds-breakfast-49010

12/20/2019, 7:37 PM
I believe so
the only thing
console_rule
does differently from
rule
is set the cacheable flag to false when it creates a rule
and I don't think there's any other way we can make a rule
er, sorry, cacheable False if it's a console_rule, not true
a

aloof-angle-91616

12/20/2019, 8:24 PM
yes, but i mean like would we want to consider e.g. adding an
_is_console_rule
attribute on things decorated with
@console_rule
?
would be good if i finally got this one in: https://github.com/pantsbuild/pants/pull/8496
w

witty-crayon-22786

12/20/2019, 8:26 PM
"cacheable" has no other meaning right now... it's vestigial
a

aloof-angle-91616

12/20/2019, 10:52 PM
thanks!