diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2014-08-22 01:29:28 +0100 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2014-08-22 14:26:06 +0100 |
commit | 22520cd7071e624cb3cbde6fdd65e872855dd6ff (patch) | |
tree | 19f67f87f173c84020188f9cc98e77070be62a2c /compiler | |
parent | bf1b117b6ab87a915bf24bcc85e216e5d51cb012 (diff) | |
download | haskell-22520cd7071e624cb3cbde6fdd65e872855dd6ff.tar.gz |
Do not zero out version number when processing wired-in packages.
Summary:
Previously, GHC would look for instances of wired-in packages in the
in-memory package database and null out the version number. This was
necessary when the sourcePackageId was used to determine the linker
symbols; however, we now use a package key, so only that needs to be
updated.
Long-term, we can remove this hack by ensuring that Cabal actually records
the proper package key in the database. This will also fix an unrelated
hack elsewhere.
Keeping version numbers means that wired in packages get rendered differently
when output by GHC. This is the source of all the test-case output changes.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: hvr, austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D170
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main/Packages.lhs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/main/Packages.lhs b/compiler/main/Packages.lhs index 78c8059046..702c0493b7 100644 --- a/compiler/main/Packages.lhs +++ b/compiler/main/Packages.lhs @@ -698,8 +698,7 @@ findWiredInPackages dflags pkgs = do where upd_pkg p | installedPackageId p `elem` wired_in_ids = let pid = (sourcePackageId p) { pkgVersion = Version [] [] } - in p { sourcePackageId = pid - , packageKey = OldPackageKey pid } + in p { packageKey = OldPackageKey pid } | otherwise = p |