Multi-instance packages status report

Joachim Breitner mail at joachim-breitner.de
Tue Jul 22 07:23:22 UTC 2014


[Replying to the list, in case it was sent to me in private by accident]


Hi Edward,

Am Montag, den 21.07.2014, 23:25 +0100 schrieb Edward Z.Yang:
> Excerpts from Joachim Breitner's message of 2014-07-21 21:06:49 +0100:
> > maybe a stupid question, but how does the package key relate to the hash
> > that "ghc-pkg" shows for package?
> 
> Fine question---this is definitely something that is different from the
> GSoC project.  The short answer is, the current hash shown in ghc-pkg is
> the ABI hash associated with the InstalledPackageId, which is computed
> after GHC is done compiling your code; whereas the package key is a
> hash of the dependency graph, which can be done before compilation.
> 
> The longer answer is we now have three ID-like things, in order of
> increasing specificity:
> 
> Package IDs: containers-0.9
>     These are the "user visible" things that we expect users to talk
>     about in Cabal file
> Package Keys: md5("containers-0.9" + transitive deps)
>     These are the identifiers the compiler cares about: they are used
>     for type equality, and contain a bit more detail than we expect
>     a user to normally need---however, a user might need to refer to
>     this to disambiguate in some situations.
> Installed Package IDs: ABI hash of compiled code
>     This uniquely identifies an installed package in the database, up
>     to ABI.
> 
> So, if two packages have the same IPID, their package keys are
> guaranteed to be the same, but not vice versa. (And likewise for package
> IDs.)


thanks for the explanations, it makes it clear to me.

Do the package key contain the flags used to compile dependencies? In
the example where it could matter the flag would change that package’s
key, so maybe it is redundant....

And just to confirm my understandn: If we had a completely reproducible
environment, the same key would (conceptually, not practically) imply
the same IPID, right?

Greetings,
Joachim



-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140722/ed069b3d/attachment.sig>


More information about the ghc-devs mailing list