Interesting thought experiment, but based on our call sites thus far, I suspect the decoupling will be more ergonomic. At a high level, most of our rules first decide “which dependencies do I care about, if any?” For example, Pylint only needs direct deps. Pytest needs transitive.
Only then, once we’ve gathered all the deps, do we hydrate Sources from those deps.
We also don’t always even need Sources. For example, the