[commit: ghc] master: Drop prefix from package keys. (ece2c43)

git at git.haskell.org git at git.haskell.org
Wed Jun 24 20:53:48 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ece2c4349718cf89b291ff3c962cbda4805bab43/ghc

>---------------------------------------------------------------

commit ece2c4349718cf89b291ff3c962cbda4805bab43
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Tue Jun 23 10:41:45 2015 -0700

    Drop prefix from package keys.
    
    Summary:
    Contains Cabal submodule update, as Cabal is responsible
    generating package keys.  We also have to update some output.
    
    Also comes with a documentation update for ghc-pkg in the
    user manual for --package-key.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: simonpj, austin
    
    Subscribers: thomie, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D1011
    
    GHC Trac Issues: #10550


>---------------------------------------------------------------

ece2c4349718cf89b291ff3c962cbda4805bab43
 docs/users_guide/packages.xml                             | 15 +++++++++++++++
 libraries/Cabal                                           |  2 +-
 testsuite/tests/cabal/cabal07/all.T                       |  2 +-
 testsuite/tests/cabal/cabal07/cabal07.stderr              |  2 +-
 testsuite/tests/ghci/scripts/T5979.stderr                 |  6 +++---
 testsuite/tests/ghci/scripts/all.T                        |  2 +-
 .../tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr    |  8 ++++----
 .../tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr    |  4 ++--
 testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout  |  6 +++---
 testsuite/tests/th/TH_Roles2.stderr                       |  6 +++---
 10 files changed, 34 insertions(+), 19 deletions(-)

diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml
index 7d7200a..555c67f 100644
--- a/docs/users_guide/packages.xml
+++ b/docs/users_guide/packages.xml
@@ -1118,6 +1118,21 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
           necessarily holds).</para>
         </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--package-key</option>
+          <indexterm><primary>
+              <option>--package-key</option>
+            </primary></indexterm>
+        </term>
+        <listitem>
+          <para>Causes <literal>ghc-pkg</literal> to interpret arguments
+          as package keys (e.g., an identifier like
+          <literal>I5BErHzyOm07EBNpKBEeUv</literal>).  Package keys are
+          used to prefix symbol names GHC produces (e.g., <literal>6VWy06pWzzJq9evDvK2d4w6_DataziByteStringziInternal_unsafePackLenChars_info</literal>), so if you need to figure out what package a symbol belongs to, use <literal>ghc-pkg</literal> with this flag.</para>
+        </listitem>
+      </varlistentry>
     </variablelist>
   </sect2>
 
diff --git a/libraries/Cabal b/libraries/Cabal
index 9e9e437..03530bf 160000
--- a/libraries/Cabal
+++ b/libraries/Cabal
@@ -1 +1 @@
-Subproject commit 9e9e4370bbca6af032794225fe5638124acf2d85
+Subproject commit 03530bf99d96f8e8ab00cd18a18222eeba064734
diff --git a/testsuite/tests/cabal/cabal07/all.T b/testsuite/tests/cabal/cabal07/all.T
index b2d2680..2286f30 100644
--- a/testsuite/tests/cabal/cabal07/all.T
+++ b/testsuite/tests/cabal/cabal07/all.T
@@ -4,7 +4,7 @@ else:
    cleanup = ''
 
 def normaliseContainersPackage(str):
-    return re.sub('containers-[^@]+ at conta_[A-Za-z0-9]+', 'containers-<VERSION>@conta_<HASH>', str)
+    return re.sub('containers-[^@]+@[A-Za-z0-9]+', 'containers-<VERSION>@<HASH>', str)
 
 test('cabal07',
      normalise_errmsg_fun(normaliseContainersPackage),
diff --git a/testsuite/tests/cabal/cabal07/cabal07.stderr b/testsuite/tests/cabal/cabal07/cabal07.stderr
index ded86e1..39f80ff 100644
--- a/testsuite/tests/cabal/cabal07/cabal07.stderr
+++ b/testsuite/tests/cabal/cabal07/cabal07.stderr
@@ -1,6 +1,6 @@
 
 Q.hs:3:8:
     Could not find module ‘Data.Set’
-    It is a member of the hidden package ‘containers-<VERSION>@conta_<HASH>’.
+    It is a member of the hidden package ‘containers-<VERSION>@<HASH>’.
     Perhaps you need to add ‘containers’ to the build-depends in your .cabal file.
     Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/ghci/scripts/T5979.stderr b/testsuite/tests/ghci/scripts/T5979.stderr
index 9be8573..b4abfbd 100644
--- a/testsuite/tests/ghci/scripts/T5979.stderr
+++ b/testsuite/tests/ghci/scripts/T5979.stderr
@@ -2,6 +2,6 @@
 <no location info>:
     Could not find module ‘Control.Monad.Trans.State’
     Perhaps you meant
-      Control.Monad.Trans.State (from transformers-0.4.2.0 at trans_<HASH>)
-      Control.Monad.Trans.Class (from transformers-0.4.2.0 at trans_<HASH>)
-      Control.Monad.Trans.Cont (from transformers-0.4.2.0 at trans_<HASH>)
+      Control.Monad.Trans.State (from transformers-<VERSION>@<HASH>)
+      Control.Monad.Trans.Class (from transformers-<VERSION>@<HASH>)
+      Control.Monad.Trans.Cont (from transformers-<VERSION>@<HASH>)
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 4094a9e..384868e 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -1,7 +1,7 @@
 # coding=utf8
 
 def normaliseTransformersPackageKey(str):
-    return re.sub('trans_[A-Za-z0-9]+', 'trans_<HASH>', str)
+    return re.sub('transformers-[^@]+@[A-Za-z0-9]+', 'transformers-<VERSION>@<HASH>', str)
 
 setTestOpts(when(compiler_profiled(), skip))
 
diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr
index 8ee9335..a89ff72 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr
+++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr
@@ -1,6 +1,6 @@
 
-<no location info>:
-    The package (base-4.8.2.0) is required to be trusted but it isn't!
+<no location info>: error:
+    The package (bytestring-0.10.6.0) is required to be trusted but it isn't!
 
-<no location info>:
-    The package (bytestring-0.10.5.0) is required to be trusted but it isn't!
+<no location info>: error:
+    The package (base-4.8.2.0) is required to be trusted but it isn't!
diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr
index 8ee9335..f4013c0 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr
+++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr
@@ -1,6 +1,6 @@
 
 <no location info>:
-    The package (base-4.8.2.0) is required to be trusted but it isn't!
+    The package (bytestring-0.10.5.0) is required to be trusted but it isn't!
 
 <no location info>:
-    The package (bytestring-0.10.5.0) is required to be trusted but it isn't!
+    The package (base-4.8.2.0) is required to be trusted but it isn't!
diff --git a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
index 62f18d1..12223e5 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
+++ b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
@@ -29,17 +29,17 @@ trusted: safe
 require own pkg trusted: True
 
 M_SafePkg6
-package dependencies: array-0.5.1.0 base-4.8.2.0* bytestring-0.10.6.0* deepseq-1.4.1.1 ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
+package dependencies: array-0.5.1.0 bytestring-0.10.6.0* deepseq-1.4.1.1 base-4.8.2.0* ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
 trusted: trustworthy
 require own pkg trusted: False
 
 M_SafePkg7
-package dependencies: array-0.5.1.0 base-4.8.2.0* bytestring-0.10.6.0* deepseq-1.4.1.1 ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
+package dependencies: array-0.5.1.0 bytestring-0.10.6.0* deepseq-1.4.1.1 base-4.8.2.0* ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
 trusted: safe
 require own pkg trusted: False
 
 M_SafePkg8
-package dependencies: array-0.5.1.0 base-4.8.2.0 bytestring-0.10.6.0* deepseq-1.4.1.1 ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
+package dependencies: array-0.5.1.0 bytestring-0.10.6.0* deepseq-1.4.1.1 base-4.8.2.0 ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
 trusted: trustworthy
 require own pkg trusted: False
 
diff --git a/testsuite/tests/th/TH_Roles2.stderr b/testsuite/tests/th/TH_Roles2.stderr
index 97694f2..1c0a217 100644
--- a/testsuite/tests/th/TH_Roles2.stderr
+++ b/testsuite/tests/th/TH_Roles2.stderr
@@ -4,9 +4,9 @@ TYPE CONSTRUCTORS
   data T (a :: k)
 COERCION AXIOMS
 Dependent modules: []
-Dependent packages: [array-0.5.1.0, base-4.8.2.0, deepseq-1.4.1.1,
-                     ghc-prim-0.3.1.0, integer-gmp-1.0.0.0, pretty-1.1.2.0,
-                     template-haskell-2.10.0.0]
+Dependent packages: [array-0.5.1.0, deepseq-1.4.1.1,
+                     pretty-1.1.2.0, base-4.8.2.0, ghc-prim-0.4.0.0,
+                     integer-gmp-1.0.0.0, template-haskell-2.10.0.0]
 
 ==================== Typechecker ====================
 



More information about the ghc-commits mailing list