Improve re-configure recompilation checking
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
There are quite a few problems with the current way we determine which re-configure steps need to be performed.
1. **All-or-nothing reconfiguration**. If we determine re-configuration is needed, we re-run every single configure step, which includes needlessly probing programs on PATH (`configureAllKnownPrograms`), running `ghc-pkg` to build an `InstalledPackageIndex` (`getInstalledPackages`), running `pkg-config` (`configurePkgconfigPackages`), etc. Moreover, it's always **package-wide**: if we only need to re-run configure because of a single component changing, we re-run the configure step for the entire package, which will also re-run code for other components.
2. **Insufficient tracking of external state**. If we depend on particular `PkgConfig` data, we don't monitor that, so if the data changes we fail to re-configure even though we should (see `updatePackageConfigFileMonitor`).
Contributor guide
Assessment
This issue has not been assessed yet.