[GHC] #12485: -package-db flags now need to be sorted by dependency order
GHC
ghc-devs at haskell.org
Sat Oct 8 20:09:06 UTC 2016
#12485: -package-db flags now need to be sorted by dependency order
-------------------------------------+-------------------------------------
Reporter: niteria | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.3
Component: Package system | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): phab:D2450,
Wiki Page: | phab:D2514
-------------------------------------+-------------------------------------
Comment (by ezyang):
Under your scheme, if a unit id (package key in your comment) ever occurs
twice in the database with different ABI, it is permanently "killed" and
we never ever use it again.
Other backwards incompatibility notwithstanding, I think this will break
GHC bootstrapping itself. Here's the situation:
1. GHC builds and ships a pile of boot libraries and GHC with
deterministically chosen unit ids; e.g., `transformers-0.5.2.0`. The
primary reason for this is when you are compiling a development version of
the compiler, you really want the symbol names of your libraries to stay
fixed; otherwise, you'd have to recompile them every time you made a small
edit.
2. When we start a GHC build, we build a few libraries and GHC using the
bootstrapping compiler. When we compile these, we have to register these
using the bootstrapping compiler. Now we have a shadowing situation!
Because the unit ids are deterministically chosen, the boot libraries from
the bootstrapping compiler will always have the same unit id as the boot
libraries; the only way to get GHC to agree to it is to shadow (but the
algorithm you gave above would just mark them as unusable.)
But maybe this is the tail wagging the dog; what we should do is have the
stage1 build have "stage1" appended to their unit ids so they don't
shadow. The last time I looked at this (#11025) it seemed difficult to
do. Maybe we should try again though.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12485#comment:29>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list