Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "cabal-install configureCompiler: configure progdb"
This reverts commit 8bdda9c. In configureCompiler the call to configureAllKnownPrograms was too eager. When called it selected the version of tools from PATH (such as alex), and then when a package was configured these tools were passed using `--with-alex` options to configure, which meant that the build-tool-depends versions were not used. (See haskell#10692) Why was this call introduced in the first place? Because configureCompiler would a different result depending on whether: * It is run for the first time, the `ProgramDb` will contain unconfigured programs. * It is run subsequently, `ProgramDb` is read from disk, it does not contain unconfigured programs. Reverting this commit rexposes the bug that the serialised ProgramDb will not contain UnconfiguredPrograms (in the case where reconfiguring is avoided). However, there are no code paths which require this logic in `cabal-install` currently. The configuration phase happens again each time that `Cabal` is called, with a populated `ProgramDb`. We will fix this before the next major `cabal-install` release, but it would not be suitable to backport. In the future we will fix this properly by refactoring `configureCompiler` so that `ProgramDb` is not serialised. The general approach will be to make `configCompilerEx` return a pair of configured programs (`ghc` and `ghc-pkg`) and expose an additional function from `Cabal` which uses these two programs to perform the modifications to the `ProgramDb` which `configCompilerEx` performs. Also see haskell#2238 and haskell#9840 Fixes haskell#10692
- Loading branch information