The check for consistency in PackageIndex should now take encapsulation and visibility of packages into account. The idea is reasonably simple: if a package A encapsulates B, then visibility of B does not propagate through A. Using this, we can compute the visibility of packages in the dependency graph. An inconsistency now occurs only if two versions of a package are both visible in another. The error message and comment for the consistency check has yet to be updated. Also (but this was expected) the current solver might produce illegal install plans according to this rule, and I have verified that this indeed happens, so I have some confidence that the check works.
In particular this should fix ticket #871 where the cabal_macros.h is missing info for testsuite components.
rather than for the union of all components in the package.
Also adapted the message for the failed check.
In the build phase, we allow the same flag choice to occur multiple times. This makes it easy to handle the situation where the same flag occurs several times in the condition tree, and hence new goals and dependencies might be introduced depending on the choice. Previously, we have ensured during validation that repeated flag choices are consistent. This behaviour has now been replaced by the new approach to collapse repeated flag choice nodes completely during validation. The advantage is that the tree is less deep, and that the trace output looks less strange. Repeated flag choices are no longer seen, which I think avoids confusion.