[Git][ghc/ghc][master] Remove references to -package-key

Marge Bot gitlab at gitlab.haskell.org
Tue May 5 07:22:59 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
1d8f80cd by Sylvain Henry at 2020-05-05T03:22:46-04:00
Remove references to -package-key

* remove references to `-package-key` which has been removed in 2016
  (240ddd7c39536776e955e881d709bbb039b48513)

* remove support for `-this-package-key` which has been deprecated at the
  same time

- - - - -


6 changed files:

- compiler/GHC/Driver/Finder.hs
- compiler/GHC/Driver/Session.hs
- docs/users_guide/expected-undocumented-flags.txt
- docs/users_guide/packages.rst
- testsuite/tests/package/package07e.stderr
- testsuite/tests/package/package08e.stderr


Changes:

=====================================
compiler/GHC/Driver/Finder.hs
=====================================
@@ -774,7 +774,7 @@ cantFindErr cannot_find _ dflags mod_name find_result
             provenance (ModOrigin{ fromOrigPackage = e,
                                    fromHiddenReexport = rhs })
               | Just False <- e
-                 = parens (text "needs flag -package-key"
+                 = parens (text "needs flag -package-id"
                     <+> ppr (moduleUnit mod))
               | (pkg:_) <- rhs
                  = parens (text "needs flag -package-id"


=====================================
compiler/GHC/Driver/Session.hs
=====================================
@@ -3191,13 +3191,6 @@ package_flags_deps = [
       (NoArg removeUserPkgDb)              "Use -no-user-package-db instead"
   , make_ord_flag defGhcFlag "package-name"       (HasArg $ \name -> do
                                       upd (setUnitId name))
-                                      -- TODO: Since we JUST deprecated
-                                      -- -this-package-key, let's keep this
-                                      -- undeprecated for another cycle.
-                                      -- Deprecate this eventually.
-                                      -- deprecate "Use -this-unit-id instead")
-  , make_dep_flag defGhcFlag "this-package-key"   (HasArg $ upd . setUnitId)
-                                                  "Use -this-unit-id instead"
   , make_ord_flag defGhcFlag "this-unit-id"       (hasArg setUnitId)
   , make_ord_flag defFlag "package"               (HasArg exposePackage)
   , make_ord_flag defFlag "plugin-package-id"     (HasArg exposePluginPackageId)
@@ -4887,7 +4880,8 @@ compilerInfo dflags
        -- built in it
        ("Requires unified installed package IDs", "YES"),
        -- Whether or not we support the @-this-package-key@ flag.  Prefer
-       -- "Uses unit IDs" over it.
+       -- "Uses unit IDs" over it. We still say yes even if @-this-package-key@
+       -- flag has been removed, otherwise it breaks Cabal...
        ("Uses package keys",           "YES"),
        -- Whether or not we support the @-this-unit-id@ flag
        ("Uses unit IDs",               "YES"),


=====================================
docs/users_guide/expected-undocumented-flags.txt
=====================================
@@ -167,7 +167,6 @@
 -split-objs
 -syslib
 -this-component-id
--this-package-key
 -ticky-LNE
 -ticky-allocd
 -ticky-dyn-thunk


=====================================
docs/users_guide/packages.rst
=====================================
@@ -965,28 +965,18 @@ Additionally, the following flags are accepted by ``ghc-pkg``:
 
     Output the ``ghc-pkg`` version number.
 
-``--ipid``
+``--ipid``, ``--unit-id``
     .. index::
        single: --ipid; ghc-pkg option
+       single: --unit-id; ghc-pkg option
 
-    Causes ``ghc-pkg`` to interpret arguments as installed package IDs
+    Causes ``ghc-pkg`` to interpret arguments as installed unit IDs
     (e.g., an identifier like
     ``unix-2.3.1.0-de7803f1a8cd88d2161b29b083c94240``). This is useful
     if providing just the package name and version are ambiguous (in old
     versions of GHC, this was guaranteed to be unique, but this
     invariant no longer necessarily holds).
 
-``--package-key``
-    .. index::
-       single: --package-key; ghc-pkg option
-
-    Causes ``ghc-pkg`` to interpret arguments as unit IDs (e.g., an
-    identifier like ``I5BErHzyOm07EBNpKBEeUv``). Package keys are used
-    to prefix symbol names GHC produces (e.g.,
-    ``6VWy06pWzzJq9evDvK2d4w6_DataziByteStringziInternal_unsafePackLenChars_info``),
-    so if you need to figure out what package a symbol belongs to, use
-    ``ghc-pkg`` with this flag.
-
 .. _building-packages:
 
 Building a package from Haskell source


=====================================
testsuite/tests/package/package07e.stderr
=====================================
@@ -2,8 +2,8 @@
 package07e.hs:2:1: error:
     Could not find module ‘GHC.Hs.MyTypes’
     Perhaps you meant
-      GHC.Hs.Types (needs flag -package-key ghc-8.11.0.20200401)
-      GHC.Tc.Types (needs flag -package-key ghc-8.11.0.20200401)
+      GHC.Hs.Types (needs flag -package-id ghc-8.11.0.20200401)
+      GHC.Tc.Types (needs flag -package-id ghc-8.11.0.20200401)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
 package07e.hs:3:1: error:


=====================================
testsuite/tests/package/package08e.stderr
=====================================
@@ -2,8 +2,8 @@
 package08e.hs:2:1: error:
     Could not find module ‘GHC.Hs.MyTypes’
     Perhaps you meant
-      GHC.Hs.Types (needs flag -package-key ghc-8.11.0.20200401)
-      GHC.Tc.Types (needs flag -package-key ghc-8.11.0.20200401)
+      GHC.Hs.Types (needs flag -package-id ghc-8.11.0.20200401)
+      GHC.Tc.Types (needs flag -package-id ghc-8.11.0.20200401)
     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
 
 package08e.hs:3:1: error:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1d8f80cd64edd1ea6a5d4c4aa2e09ad0d077ae1b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1d8f80cd64edd1ea6a5d4c4aa2e09ad0d077ae1b
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200505/061fac23/attachment-0001.html>


More information about the ghc-commits mailing list