Just ranting: We have some nasty effective depende...
# development
h
Just ranting: We have some nasty effective dependency cycles in the options bootstrapping code that were hidden due to call-by-type, but switching to call-by-name exposes them as import cycles
For one thing,
Subsystem
knows about
@pants.engine.rule.rule
because
Subsystem.rules()
returns the rules needed to instantiate the Subsystem. But
pants.engine.rule
also contains
collect_rules()
, which needs to know about
Subsystem
for its own logic
And each of those are imported in over 400 files, so splitting them up would be annoying
I think maybe I can change the logic in
collect_rules()
to avoid importing
Subsystem
, but it is very annoying that call-by-type let us get away with all sorts of sins
And now the call-by-name tide is out, and we’re seeing which packages were swimming naked…
w
Yep, I ran into something like this when I yolo'd CBN a while back. The more core we went, the more of these shenanigans that happened
h
This refactors the problem away, and it was not fun: https://github.com/pantsbuild/pants/pull/22599
🚢 1
And causes all the tests to fail… one sec
OK, good to go now