If I subclass Optionable and implement `register_o...
# general
e
If I subclass Optionable and implement
register_options
, does that function get magically called?
a
if you make something into an
optionable_rule()
, yes
e
thx
w
optionable_rule may be a bit of a misnomer... i think that it might only work for Subsystems
(because Optionable is abstract, iirc)?
and optionable_rule is the v2 way: if you'd like options in a v1 context, there is another approach.
@early-needle-54791: what are you trying to add?
a
optionable_rule()
works for any concrete
Optionable
i'm pretty sure, just from looking at the implementation?
w
yea. but "subclasses of Optionable" today are 1) Subsystems, 2) Tasks, 3) v2 Goals
a
If I subclass Optionable
?
w
subclassing it directly is less of a thing... that's all i was getting at
("trying to" get at)
e
I want to make a TargetPlatformConstraint class that is a rule that declares an option
w
hm
a
we've usually just done subsystems for rule options
see the v2
ListOptions
for example
w
that's something else now
Goal.Options
a
oh, i’m sorry. that’s right
thanks!