is there a reason we decided `def global_subsystem...
# development
a
is there a reason we decided
def global_subsystems()
was v1-only? if i define a context-aware object factory in my v2 ruleset which pulls in a subsystem using
.global_instance()
, i need that subsystem to be available. i was able to overcome this by just registering it as a v1 plugin as well, but unless we plan to literally deprecate
.global_instance()
for v2 (which it's not clear that we are) it seems like we should allow
global_subsystems
to be in v2 plugins as well
h
cc @happy-kitchen-89482. He came upon this yesterday
It’s possible that we want to keep the hook, but don’t document it so that we have more flexibility to remove later. Personally, I think it would be nice to remove
.global_instance()
to simplify the Optionable code, but I don’t think anyone has any plans to do this yet
a
i think it would be great to do that
h
which part does “that” refer to?
a
the second paragraph
👍 1
h
I think the only blocker is not knowing how
object
and
CAFO
would access subsystems
👍 1
a
SubsystemRule
or whatever it is now is just exactly what we need
yea
i was trying to think of whether i had run into literally the only edge case
which i think i did with the CAOF to make different thrift libraries in the twitter repo
h
I don’t think anyone has thought about what CAFO should look like. DWH intentionally didn’t try to replace it and wanted a light-weight macro system to start
i was trying to think of whether i had run into literally the only edge case
Agreed that I think object/CAFO are the only remaining uses of
.global_subsystem()
a
i think we can deprecate our usage of CAOF and turn them into macros at twitter, it's mainly the thrift libraries one and i think the new macro system can do everything except maybe access option values
h
We can’t for Pants. Pants depends on CAOF for
python_requirements
and
pants_requirement
. And the new macros don’t work there because the loading mechanism; new macros are only internal to your own repo, afaict
I think we need a modern replacement to CAOF. We would have it for more advanced cases that the light weight macros can’t cover
a
i would prefer to have a single macro system
👍 1
w
a
that is fantastically helpful thank you
i think stu's issue link might be the way we can avoid making the macro system too heavyweight
w
pretty stale… lots has changed. but
python_requirements
is still the hold out.
✍️ 2
h