Switch from -this-package-key to -this-unit-id.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Mon, 18 Jan 2016 16:32:27 +0000 (17:32 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 19 Jan 2016 10:06:08 +0000 (11:06 +0100)
commit9cebc2457aff5b9ad59ccecacc8df7e1155add7a
treeaf65d7a8389cc925d69c48e898422bf92ae4a30f
parentf02fefd3187beed98444273e5fbc2c022af5efbc
Switch from -this-package-key to -this-unit-id.

A small cosmetic change, but we have to do a bit of work to
actually support it:

    - Cabal submodule update, so that Cabal passes us
      -this-unit-id when we ask for it.  This includes
      a Cabal renaming to be consistent with Unit ID, which
      makes ghc-pkg a bit more scrutable.

    - Build system is updated to use -this-unit-id rather than
      -this-package-key, to avoid deprecation warnings.  Needs
      a version test so I resurrected the old test we had
      (sorry rwbarton!)

    - I've *undeprecated* -package-name, so that we are in the same
      state as GHC 7.10, since the "correct" flag will have only
      entered circulation in GHC 8.0.

    - I removed -package-key.  Since we didn't deprecate -package-id
      I think this should not cause any problems for users; they
      can just change their code to use -package-id.

    - The package database is indexed by UNIT IDs, not component IDs.
      I updated the naming here.

    - I dropped the signatures field from ExposedModule; nothing
      was using it, and instantiatedWith from the package database
      field.

    - ghc-pkg was updated to use unit ID nomenclature, I removed
      the -package-key flags but I decided not to add any new flags
      for now.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: 23Skidoo, thomie, erikd

Differential Revision: https://phabricator.haskell.org/D1780

(cherry picked from commit 240ddd7c39536776e955e881d709bbb039b48513)
24 files changed:
compiler/ghc.cabal.in
compiler/main/DynFlags.hs
compiler/main/HscTypes.hs
compiler/main/PackageConfig.hs
compiler/main/Packages.hs
configure.ac
docs/users_guide/8.0.1-notes.rst
docs/users_guide/packages.rst
libraries/Cabal
libraries/base/base.cabal
libraries/ghc-boot/GHC/PackageDb.hs
libraries/ghc-prim/ghc-prim.cabal
libraries/integer-gmp/integer-gmp.cabal
libraries/integer-simple/integer-simple.cabal
libraries/template-haskell/template-haskell.cabal
mk/config.mk.in
rts/ghc.mk
rules/distdir-way-opts.mk
testsuite/tests/module/base01/Makefile
testsuite/tests/rename/prog006/Makefile
testsuite/tests/rename/should_compile/T3103/test.T
utils/ghc-cabal/Main.hs
utils/ghc-pkg/Main.hs
utils/mkUserGuidePart/Options/Packages.hs