Preliminary bug description:
-
cabal solver finds valid build-plan (where e.g. a test component of a dependency foo isn't enabled)
-
build-plan gets executed, and during the configure phase of foo the internal check fails due to an internal build-depends: foo ==0.0.* dependency even though the test component isn't relevant for the picked build-plan:
cabal: The package has an impossible version range for a dependency on an internal library: foo ==0.0.*. This version range does not include the current package, and must be removed as the current package's library will always be used.
I consider the configure phase to be the culprit here, as it triggered a failure for a component which was irrelevant to the requested build-plan.