[GHC] #10566: Move "package key" generation to GHC

GHC ghc-devs at haskell.org
Tue Jun 23 18:34:18 UTC 2015


#10566: Move "package key" generation to GHC
-------------------------------------+-------------------------------------
              Reporter:  ezyang      |             Owner:  ezyang
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:  7.12.1
             Component:  Package     |           Version:  7.10.1
  system                             |  Operating System:  Unknown/Multiple
              Keywords:              |   Type of failure:  None/Unknown
          Architecture:              |        Blocked By:
  Unknown/Multiple                   |   Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 Currently in GHC 7.10, we have the following situation:

 1. Cabal computes a package key, which in practice (since no one is using
 Backpack in the wild) is a Merkle tree of the versions of each of the
 dependencies of the package.
 2. This package key is passed to GHC via `-this-package-key`
 3. GHC handles the package key opaquely

 Now, in recent Backpack implementation, we need GHC to be able to compute
 package keys. (The concrete case: you're type-checking an interface file
 of an indefinite package, where you want to instantiate it with some
 assignment of its holes: instantiating those holes you need to instantiate
 any package keys mentioned in the interface, in which case you really want
 to be able to compute the hash.) So I want to move package key generation
 to GHC.

 The primary implication is this: does Cabal continue to generate package
 keys?  If it doesn't, we should revert from `-this-package-key` back to
 `-package-name` from the previous version (but maybe renamed because this
 name was bad).  GHC then computes a package key based on `-package-name`
 and the explicitly mentioned `-package` dependencies, and Cabal reads it
 out with something akin to `--abi-hash`.  If it does, we need to ensure
 GHC and Cabal's package key algorithms stay synchronized. I personally
 lean towards the first option.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10566>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list