Imagine that you have a Cabal package "foo" with many public sublibraries, where some of those sublibraries have *lots* of dependencies to other packages.
If I'm interpreting this Cabal issue https://github.com/haskell/cabal/issues/6039 correctly, if a package depends on a *single* sublibrary of "foo", the solver will have to find a plan that satisfies the "build-depends:" of *all* sublibraries of "foo", even if we aren't interested in them. Which is annoying. Why solve for the "build-depends:" of a library that you know aren't going to use?
What would be a way to alleviate this wart? I want to have yuge packages with lots of sublibraries with lots of dependencies.
Perhaps I could use a flag per sublibrary, that enabled or disabled the constraints in the "build-depends:" of that sublibrary. Something like this: