[GHC] #12485: -package-db flags now need to be sorted by dependency order

GHC ghc-devs at haskell.org
Mon Sep 12 22:50:25 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):

 > Now we are relying on the package-db ordering on the command line for
 dependency safety, whereas previously we could check because we had the
 ABIs of the dependencies.

 Yes, you are right. :(

 > The idea of a package DB "stack" was really just a temporary situation
 to deal with the fact that we couldn't link multiple package instances
 into the same binary so we had to have some way to resolve conflicts; my
 intention was that eventually the idea of a "stack" would just go away
 when it wasn't necessary any more.

 And this is what I get for not being involved in the initial discussion ;)
 But it is hard for me to see how you could actually do this, because you
 can always end up in a situation where you have two separate packages with
 the same symbol name, and now you have to pick one.

 > In the short term, would anything go wrong if we allowed an IPID
 anywhere in the stack to satisfy a dependency provided it was unique? And
 if a dependency is not unique, we resolve in the current way, using the DB
 ordering.

 Nothing wrong! It just sounds really annoying to implement. ;) (I guess...
 we do a pre-pass to figure out conflicts, and then run the shadowing
 algorithm?)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12485#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list