[commit: ghc] wip/T14381: ghc-pkg: properly recompute `abi-depends` for updated packages. (7cb9fd8)

git at git.haskell.org git at git.haskell.org
Mon May 28 07:03:53 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T14381
Link       : http://ghc.haskell.org/trac/ghc/changeset/7cb9fd83ae6e4de8ffef280cf67d53a9a6d663d4/ghc

>---------------------------------------------------------------

commit 7cb9fd83ae6e4de8ffef280cf67d53a9a6d663d4
Author: Tobias Dammers <tdammers at gmail.com>
Date:   Tue May 22 10:32:03 2018 +0200

    ghc-pkg: properly recompute `abi-depends` for updated packages.
    
    The `abi-depends:` Cabal field turns out to be problematic due to cached
    package dependencies; from the perspective of ghc-pkg, this field is
    unreliable, and also redundant, because the required information is
    already available in the existing package database.
    
    So we do the following:
    
    - Ignore declared abi-depends
    - Infer correct abi-depends from existing package data
    - Warn about any packages that declare abi-depends that differ from what
      we inferred
    - In verbose mode, warn about any packages that declare abi-depends at
      all.
    
    Previous work on this had been done in 1cdc14f9c0, however, that
    solution suffered from a few minor drawbacks which we fix here:
    
    - The previous solution only looked at the current package database; we
      now inspect the entire stack of databases, to correctly reflect
      possible dependencies.
    - We now output warnings on stderr, not stdout.
    - When issuing a warning, we list the offending packages (otherwise, the
      warning wouldn't be very useful in practice).
    - By default, we only warn about packages that deviate (declare
      abi-depends /= inferred abi-depends).
    - Warnings can now be controlled through verbosity.
    - Testsuite reflects new situation.


>---------------------------------------------------------------

7cb9fd83ae6e4de8ffef280cf67d53a9a6d663d4
 testsuite/tests/cabal/cabal05/cabal05.stderr       |   4 +
 .../tests/safeHaskell/check/pkg01/safePkg01.stdout |  16 +--
 utils/ghc-pkg/Main.hs                              | 142 ++++++++++++++++++---
 3 files changed, 139 insertions(+), 23 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 7cb9fd83ae6e4de8ffef280cf67d53a9a6d663d4


More information about the ghc-commits mailing list