Description
There are a bunch of issues and PRs calling for adding more information to InstalledPackageInfo. I thought it would be a good idea to collect them here with a short summary so we can have better visbility and, if needed, discuss the bigger picture.
- Encode flag setting in InstalledPackageInfo? #8702 by @bgamari. The solver does not know what flags have been used to compile an installed package, and it won't recompile an installed package even if we request it with different flags.
extra-bundled-libraries
shouldn't usehsLibraries
#8701 by @bgamari. Cabal should use a separate field forextra-bundled-libraries
ashsLibraries
is deemed inapproriate.- Track static vs. dynamic dependencies #8624 and Extend the InstalledPackageInfo record with 2 fields for artifacts. #8696 by @bairyn. Similar to the first issue, solver does not know about artifact and could end up choosing an installed package that is missing some files (I admit I don't have a good understanding of this issue, please correct me if I botched this summary).
- Make the cabal-install solver multilibs-aware #6039 by @fgaz. Sublibraries are installed as separate packagedb entries, and the solver has no information to group them back together into a coherent source package configuration. This causes the solver to always reject and recompile installed packages that provide public sublibraries (as the installed package is seen as missing the sublibrary)
- RFC consider including identifying infos from
ghc --info
in nix-style hash #5116 by @hvr. It suggests adding something to distinguish two GHC HEAD with the same version. Not sure whether this is still relevant. - Optionally add the revison number to Paths_$pkgid.version #1506 by @23Skidoo. It suggests adding information about cabal file revisions to InstalledPackageInfo, deemed a bad idea by @dcoutts and led to Add a Version_ module which does not depend on install dirs #3909 which was implemeted in Add PackageInfos_ (#3909) #8534. I think this can just be closed.
AFAIU Changing InstalledPackageInfo requires some level of coordination with GHC since ghc-pkg uses Cabal to read the files and distill them into a GHC specific version. What is the process to make changes to InstalledPackageInfo?
Is it a good idea to keep adding cabal specific things to InstalledPackageInfo
? Other tools might install packages in packagedb.
Should cabal install have its own database?
Should we have a clear distinction between ghc fields and tool specific fields?
In #8702 @bgamari refers to "non-normative" fields (which I have not found any documentation for) and suggests a syntax for fields ghc-pkg will automatically ignore (x-field
).
Ping spamming @ulysses4ever @fgaz @Mikolaj @gbaz @hsyl20 and others (apologies in advance).