diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-06-23 13:15:17 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-07-23 13:35:45 -0700 |
commit | f9687caf337d409e4735d5bb4cf73a7dc629a58c (patch) | |
tree | 3f4d0bc7fcd74b66ad750eed4d134c4afdcb7803 /testsuite/tests | |
parent | 5ff4daddd9bc8f424d8f71fb01ebbbae9d608cdf (diff) | |
download | haskell-f9687caf337d409e4735d5bb4cf73a7dc629a58c.tar.gz |
Library names, with Cabal submodule update
A library name is a package name, package version, and hash of the
version names of all textual dependencies (i.e. packages which were included.) A library
name is a coarse approximation of installed package IDs, which are suitable for
inclusion in package keys (you don't want to put an IPID in a package key, since
it means the key will change any time the source changes.)
- We define ShPackageKey, which is the semantic object which
is hashed into a PackageKey. You can use 'newPackageKey'
to hash a ShPackageKey to a PackageKey
- Given a PackageKey, we can lookup its ShPackageKey with
'lookupPackageKey'. The way we can do this is by consulting
the 'pkgKeyCache', which records a reverse mapping from
every hash to the ShPackageKey. This means that if you
load in PackageKeys from external sources (e.g. interface
files), you also need to load in a mapping of PackageKeys
to their ShPackageKeys so we can populate the cache.
- We define a 'LibraryName' which encapsulates the full
depenency resolution that Cabal may have selected; this
is opaque to GHC but can be used to distinguish different
versions of a package.
- Definite packages don't have an interesting PackageKey,
so we rely on Cabal to pass them to us.
- We can pretty-print package keys while displaying the
instantiation, but it's not wired up to anything (e.g.
the Outputable instance of PackageKey).
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1056
GHC Trac Issues: #10566
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/cabal/sigcabal01/Makefile | 2 | ||||
-rw-r--r-- | testsuite/tests/cabal/sigcabal01/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/cabal/sigcabal02/Makefile | 4 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout | 6 | ||||
-rw-r--r-- | testsuite/tests/th/TH_Roles2.stderr | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/tests/cabal/sigcabal01/Makefile b/testsuite/tests/cabal/sigcabal01/Makefile index c284842bdd..73cffd7a68 100644 --- a/testsuite/tests/cabal/sigcabal01/Makefile +++ b/testsuite/tests/cabal/sigcabal01/Makefile @@ -22,7 +22,7 @@ sigcabal01: cd p && $(SETUP) build cd p && $(SETUP) copy cd p && $(SETUP) register --print-ipid > ../p_strict - '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package-id "`cat p_lazy` (P as P.Lazy)" -package-id "`cat p_strict` (P as P.Strict)" --make Main.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_lazy` (P as P.Lazy)" -package-id "`cat p_strict` (P as P.Strict)" --make Main.hs ! ./Main ifneq "$(CLEANUP)" "" $(MAKE) clean diff --git a/testsuite/tests/cabal/sigcabal01/all.T b/testsuite/tests/cabal/sigcabal01/all.T index a797c0890d..24c50b672a 100644 --- a/testsuite/tests/cabal/sigcabal01/all.T +++ b/testsuite/tests/cabal/sigcabal01/all.T @@ -4,6 +4,6 @@ else: cleanup = '' test('sigcabal01', - normal, + expect_broken(10622), run_command, ['$MAKE -s --no-print-directory sigcabal01 ' + cleanup]) diff --git a/testsuite/tests/cabal/sigcabal02/Makefile b/testsuite/tests/cabal/sigcabal02/Makefile index 152aaeac0e..c45697d1b6 100644 --- a/testsuite/tests/cabal/sigcabal02/Makefile +++ b/testsuite/tests/cabal/sigcabal02/Makefile @@ -21,9 +21,9 @@ sigcabal02: cd q && $(SETUP) build cd q && $(SETUP) copy cd q && $(SETUP) register --print-ipid > ../q_ipid - '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make Main.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make Main.hs ./Main - ! '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make ShouldFail.hs + ! '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make ShouldFail.hs ifneq "$(CLEANUP)" "" $(MAKE) clean endif diff --git a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout index 12223e534a..a3810ffb8b 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 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 +package dependencies: bytestring-0.10.6.0* deepseq-1.4.1.1 array-0.5.1.0 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 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 +package dependencies: bytestring-0.10.6.0* deepseq-1.4.1.1 array-0.5.1.0 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 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 +package dependencies: bytestring-0.10.6.0* deepseq-1.4.1.1 array-0.5.1.0 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 1c0a217a05..98029ab3a8 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, 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] +Dependent packages: [pretty-1.1.2.0, deepseq-1.4.1.1, + array-0.5.1.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 ==================== |