Rebase PR #9422 (Add separate cache for getPkgConfigDb) on haskell/cabal master - #3
Closed
andreabedini with Copilot wants to merge 43 commits into
Closed
Rebase PR #9422 (Add separate cache for getPkgConfigDb) on haskell/cabal master#3andreabedini with Copilot wants to merge 43 commits into
andreabedini with Copilot wants to merge 43 commits into
Conversation
Without some distinct identifier, downloaded sources will accumulate (and have been since the last time the datestamp was updated). The old caches are ignored and will be purged according to GitHub's cache expiration, because otherwise we'd continue to carry 4 years' worth of outdated source tarballs.
When a non-library component has unfilled Backpack signature requirements, the error message now shows where each requirement came from (e.g. "brought into scope by build-depends: Fail1") using the ModuleSource information already available in the ModuleScope. Updated the Fail3 test golden files and strengthened the test assertion to verify provenance information is present. Addresses haskell#7192 run fourmalou more formatting
Remove commented-out `planPkgOf` function from `SolverInstallPlan`.
The primary entrypoint is now `make bootstrap-jsons`, which is now documented and called out in `bootstrap/README.md`. It automatically tries to obtain ghc versions from first `ghcup`, falls back to Nix if `nix-shell` is found, and if all else fails warns the user to install the appropriate ghcs. The Nix script can still be used directly, but now obtains the list of ghc versions from the `Makefile`.
- Format ghc-supported-languages module - Add an args check with help - All extensions should be registered - Exclude known languages - Rename exceptions to langsAsExts - Rename executable to ghc-supported-extensions - Use explicit import lists, except for prelude - Don't use dieNoVerbosity - Move to exes/GhcSupportedExtensions.hs - Handle the zero args case gracefully - Satisfy fourmolu - We're checking KnownExtension - Avoid _ in registered pattern match - Mention language editions - Add a note about missing language editions
- Add to vim syntax and sort - Update md5 check expectation
Highly incomplete. Also, revise contributor documentation including moving some things to the maintainer documentation and absorbing the old maintainers list which is now at the top.
This commit updates the logic in Distribution.Client.Dependency, namely addDefaultSetupDependencies, to add an implicit Cabal dependency for the custom setup stanza of packages with build-type: Hooks. This ensures we always pick a version of Cabal that is compatible with whatever other libraries the custom-setup stanza depends on (such as Cabal-hooks). Test in T11331. Fixes haskell#11331
Fix typo explitic
Follow hlint suggestion: move guards forward
…ad-code refactor(cabal-install): remove dead code
Add ghc-9.14 language extensions
…uages Add exe ghc-supported-languages
…eanup clean up bootstrap JSON generation
…e-timestamp remove datestamp from bootstrap cache keys
first cut at maintainer documentation
"Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.12.1.0 supports 'ghc' version < 9.12): /usr/bin/ghc-9.12.3 is version 9.12.3" is now only shown at Info level of verbosity Closes haskell#9734
Hooks: use the appropriate Cabal unit ID
Derive Foldable for CondBranch We no longer support building Cabal with GHCs this old (8.0.1/8.0.2). The hand-written instance that was a necessary workaround for older GHCs was removed. Update testsuite fixtures Since CondTree refactor, trailing zeros in generated GPD in the testsuite started tripping GPD validation checks. Notably the `BaseNoUpperBounds` and `TrailingZeroUpperBounds` errors. The refactor removes the trailing zeros and adds a upperbound to base.
Bumps the github-actions group with 1 update: [haskell-actions/run-fourmolu](https://github.com/haskell-actions/run-fourmolu). Updates `haskell-actions/run-fourmolu` from 11 to 12 - [Release notes](https://github.com/haskell-actions/run-fourmolu/releases) - [Changelog](https://github.com/haskell-actions/run-fourmolu/blob/master/CHANGELOG.md) - [Commits](haskell-actions/run-fourmolu@v11...v12) --- updated-dependencies: - dependency-name: haskell-actions/run-fourmolu dependency-version: '12' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
Follow hlint suggestion: use unless
configure GHC: reduce verbosity of newer version warn to info
Clarify GHC support window
Include provenance in Backpack unfilled requirements error
…ns/github-actions-33ba744d50 Bump haskell-actions/run-fourmolu from 11 to 12 in the github-actions group
* Fix the OS string encoding for GNU/Hurd Following https://github.com/haskell/cabal/pull/9434/files , and as seen in the various gnu_HOST_OS usages in the ghc source code, it is expected that GNU/Hurd is advertised as "gnu", like the autotools do. * Update changelog.d/pr-11401 Co-authored-by: ffaf1 <fa-ml@ariis.it> * Fixups --------- Co-authored-by: ffaf1 <fa-ml@ariis.it>
Follow hlint suggestion: use typeRep
…straints Remove duplicated constraints from CondTree
upgrade uv dependencies per dependabot 2026-03-31
It was only used to avoid #ifdefs for GHC 7.10 compatibility, which is no longer needed.
remove "GHC < 6.10 → put /include/mingw in rts's installDirs" condition (ancient GHC)
Remove obsolete flatDeps alias
…tore-ghc Ignore testdb/intree/store/ghc-*/
Querying pkg-config for the version of every module can be a very expensive operation on some systems. This change adds a separate, per-project, cache for PkgConfigDB; reducing the cost from "every plan change" to "every pkg-config-db change per project". The cache key is composed by the pkg-config configured program and the list of directories reported by pkg-config's pc_path variable. Co-authored-by: andreabedini <69135+andreabedini@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
andreabedini
April 10, 2026 14:46
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR rebases the changes from haskell/cabal#9422 ("Add separate cache for getPkgConfigDb") on top of the current master of haskell/cabal (commit
41f5e57e1).Summary
The original PR adds a separate, per-project cache for
PkgConfigDBto reduce the cost of queryingpkg-configfrom "every plan change" to "every pkg-config-db change per project". The cache key is composed of the configuredpkg-configprogram and the list of directories it reports viapc_path.Conflict Resolutions
The rebase encountered conflicts in 3 files, which were resolved as follows:
ProjectConfig.hsresolveNumJobsSetting(HEAD addition) andresolveProgramDb(PR addition)ProjectPlanning.hsconfigureCompiler: Kept HEAD's version which usesCabal.configCompiler+Cabal.configCompilerProgDb(separate step outside caching, per Note [Caching the result of configuring the compiler]). Restored pattern match destructuring ofprojectConfigLocalPackagesneeded by HEAD's implementation.getPkgConfigDb: Used PR's cached version withrerunIfChangedbut adapted for the current API — replaced the removedNoPkgConfigDbconstructor withNothing, so the function returnsRebuild (Maybe PkgConfigDb)instead ofRebuild PkgConfigDb.phaseRunSolver: Used PR's return type (3-tuple withoutPkgConfigDb); changed the parameter type fromPkgConfigDbtoMaybe PkgConfigDbto match the type returned by the updatedgetPkgConfigDb.cabal.test.hs(RejectFutureIndexStates)sedapproach (avoids macOS-incompatible-iflag)Verification
cabal build cabal-installsucceeds with no type errorsfourmolu --mode checkpasses on changed files