Skip to content

Conversation

@mpickering
Copy link
Collaborator

The cause of this bug was when ProgramDb is serialised (by caching), the UnconfiguredPrograms are discarded. cabal-install resolves this by adding back the relevant UnconfiguredPrograms in compilerProgramDb.

The cause of the bug was the order programs were added back. I have clarified the logic of the function now to:

  1. Add back all unconfigured programs, and handle an explicit ghc-pkg path.
  2. Then configure ghc-pkg and check it's the right version.

This makes sure that the user-supplied path is honoured in both situations.

Fixes #11373

Please read Github PR Conventions and then fill in one of these two templates.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:


Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

The cause of this bug was when ProgramDb is serialised (by caching), the
`UnconfiguredPrograms` are discarded. `cabal-install` resolves this by
adding back the relevant `UnconfiguredPrograms` in `compilerProgramDb`.

The cause of the bug was the order programs were added back. I have
clarified the logic of the function now to:

1. Add back all unconfigured programs, and handle an explicit ghc-pkg
   path.
2. Then configure ghc-pkg and check it's the right version.

This makes sure that the user-supplied path is honoured in both
situations.

Fixes #11373
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cabal 3.16.0.0 chooses discovered ghc-pkg binary over user-provided binary, leading to version mismatch when doing WASM builds with GHCup-managed GHC

5 participants