[GHC] #10714: After implementing new installed package ID (hash of sdist), get rid of package keys
#10714: After implementing new installed package ID (hash of sdist), get rid of package keys -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: new Priority: normal | Milestone: Component: Package | Version: 7.10.2 system | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- GHC tracking bug for https://github.com/haskell/cabal/issues/2745 Externally, GHC's flags do not have to change much; a user simply passes the installed package ID to the flag currently named `-this-package-key` (but perhaps we should rename this.) Internally, if we can assume that `PackageKey == InstalledPackageId`, we can do away with the `InstalledPackageId` map and get rid of the level of indirection between the bin-pkg-db (which records installed package IDs`) and GHC's guts (which record package keys). Blocked on Cabal not actually using ABI hashes to identify packages. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10714> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10714: After implementing new installed package ID (hash of sdist), get rid of package keys -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: backpack Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by ezyang): * keywords: => backpack -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10714#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10714: After implementing new installed package ID (hash of sdist), get rid of package keys -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: backpack Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by ezyang): Here is a complication: what should shadowing do in this world? Of course, within a package database, shadowing cannot occur, because there can only ever be one entry per IPID, whereas shadowing occurred when there were two entries with differing IPIDs but identical package keys. However, there is now a thorny problem of what should be done if the user and global package database both have an entry for the same IPID! Previously, GHC assumed that the ABIs are the same, and thus they are interchangeable; however, it is possible for this invariant to be broken. What it seems GHC should do is check the ABI of the package in question, and if they match filter out as before. However, if the ABIs do not match, we can either (1) complain loudly, or (2) shadow all prior references to the IPID so that we can safely use the newer IPID. The second possibility seems like a lot of complication for a case that really shouldn't happen, so let's not do it. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10714#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10714: After implementing new installed package ID (hash of sdist), get rid of package keys -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: backpack Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by ezyang): Another point: when Backpack is back in the picture, `UnitKey` only equals `InstalledPackageId` if the package in question is a non-Backpack package (installed package ID is per package, but a package can have multiple units.) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10714#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10714: After implementing new installed package ID (hash of sdist), get rid of package keys -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: backpack Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by Edward Z. Yang <ezyang@…>): In [changeset:"5b0191f74ab05b187f81ea037623338a615b1619/ghc" 5b0191f7/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="5b0191f74ab05b187f81ea037623338a615b1619" Update Cabal to HEAD, IPID renamed to Component ID. This commit contains a Cabal submodule update which unifies installed package IDs and package keys under a single notion, a Component ID. We update GHC to keep follow this unification. However, this commit does NOT rename installed package ID to component ID and package key to unit ID; the plan is to do that in a companion commit. - Compiler info now has "Requires unified installed package IDs" - 'exposed' is now expected to contain unit keys, not IPIDs. - Shadowing is no more. We now just have a very simple strategy to deal with duplicate unit keys in combined package databases: if their ABIs are the same, use the latest one; otherwise error. Package databases maintain the invariant that there can only be one entry of a unit ID. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari, hvr, goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1184 GHC Trac Issues: #10714 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10714#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10714: After implementing new installed package ID (hash of sdist), get rid of package keys -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: closed Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: fixed | Keywords: backpack Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by ezyang): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10714#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC