[GHC] #11558: Using Cabal 1.22 against GHC 8.0 results in unhelpful errors

GHC ghc-devs at haskell.org
Wed Feb 10 10:19:29 UTC 2016


#11558: Using Cabal 1.22 against GHC 8.0 results in unhelpful errors
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Package system    |              Version:  8.0.1-rc1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1892
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"d80caca10d7c2fa1c9ee8ef6bcafac365d02ff3d/ghc" d80caca/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="d80caca10d7c2fa1c9ee8ef6bcafac365d02ff3d"
 Error early when you register with too old a version of Cabal.

 On the GHC 8.0 RCs, multiple users reported a very strange error
 whereby GHC would complain that the symbols names recorded in interface
 files did not match the expected name.  The reason for this is
 that they were using an old version of Cabal which chose symbol
 names differently from the installed package ID ('id' field) which
 the package was to be installed with; GHC 8.0 now mandates that
 these coincides.

 This change adds a test to ghc-pkg to make sure that 'id' and 'key'
 (which is how Cabal previously reported what the symbol name
 was supposed to be) match; if they don't match or key is missing,
 we assume that the Cabal was too old.

 Bikeshed points:

     - Should we offer more information about how to upgrade
       Cabal correctly (i.e. specify a version?)

     - Should we allow for a missing 'key'?  If we allow for
       'key' to be missing, we lose the ability to detect
       Cabal from GHC 7.8 or earlier being used.  If we
       require it to be specified, then it will not be possible
       for Cabal to deprecate the (unused) field and remove it
       without having BC for 8.0.

 Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>

 Test Plan: validate

 Reviewers: austin, bgamari, hvr

 Reviewed By: hvr

 Subscribers: bergmark, thomie

 Differential Revision: https://phabricator.haskell.org/D1892

 GHC Trac Issues: #11558
 }}}

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


More information about the ghc-tickets mailing list