Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix issue #3428, by updating the install plan with the right info
When building packages we update the install plan with the completed packages and for libraries we include the InstalledPackageInfo. We now support packages that register multiple libraries but only one of them is the representative public library, and only that one is stashed in the install plan. Out of the list of library registraions we select the primary one by looking for the one with the expected unit it. As part of collecting the registration info we do some processing (to account for older Cabal and ghc versions) and the mistake was that while did that post-processing ok and registered the right libraries we ended up returing the un-processed registraion info and so then failed to find the primary lib, and thus failed to stash any library info in the install plan, causing internal errors later on.
So the first patch fixes it to return the same post-processed registration info as actually gets registered. Subsequent patches improve the internal error checking for this issue.
This doesn't yet add a regression test. I'll see if I can make a simple one.