-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InstalledPackageInfo mega issue #8967
Comments
|
Should it be Package metadata ( Sorry for bombarding with questions, I don't want to led us to analysis-paralisys :-) I want to understand the design space a bit more. |
Thanks for putting together this list, @andreabedini ! An
Indeed GHC doesn't care about these fields but they are fairly universal and I don't think they do much harm to include. Moreover, some of these fields may be used by tools other than GHC (e.g. |
The Cabal-syntax package is the one inside cabal.git that provides the InstalledPackageInfo record.
In ghc.git, there is a utility application called ‘ghc-pkg’ whose source is largely in I think Perhaps the main solution is adding a version field, then, enabling the IPI record serialized into the package's .conf file to be tied to the Cabal-syntax version that specifies it. This would make any ‘x-’ experimental standardization easier in the future. Then perhaps a list of x- fields can be added, for external users of Cabal-syntax to use to extend IPI. Cabal-syntax would store these key value pairs uninterpreted in InstalledPackageInfo, for external users to manage. Does this sound reasonable? |
@bairyn Thanks for chiming in and also for mentioning RFC 6648. I am actually reluctant to go down the You could say it's a Cabal thing that GHC reads, but then why TBH I am still confused by the whole situation. |
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.
extra-bundled-libraries
shouldn't usehsLibraries
#8701 by @bgamari. Cabal should use a separate field forextra-bundled-libraries
ashsLibraries
is deemed inapproriate.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.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).
The text was updated successfully, but these errors were encountered: