Skip to content

Improve re-configure recompilation checking #11761

@sheaf

Description

@sheaf

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions