Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Mar 13, 2015
    • Duncan Coutts's avatar
      Merge pull request #2466 from edsko/bugfix/package-key · 25807bee
      Duncan Coutts authored
      Make sure to pass the package key to ghc
      25807bee
    • Edsko de Vries's avatar
      Make sure to pass the package key to ghc · 3e78870d
      Edsko de Vries authored
      In https://github.com/haskell/cabal/pull/2439 the invocation of Haddock is
      changed to use Haddock's new `--package-name` and `--package-version` flags,
      necessary for GHC >= 7.10 (Cabal issue
      https://github.com/haskell/cabal/issues/2297 / Haddock issue
      https://github.com/haskell/haddock/issues/353). However, this commit also
      removes the `-package-name` argument to GHC. This is incorrect, as it means
      that GHC will end up calling the package `main` and we end up with Haddock link
      environments such as
      
          (trans_H9c1w14lEUN3zdWCTsn8jG:Control.Monad.Trans.Error.strMsg, main:Control.Monad.Error.Class)
      
      Note that before this commit we ended up with
      
          (trans_H9c1w14lEUN3zdWCTsn8jG:Control.Monad.Trans.Error.strMsg, mtl-2.1.1:Control.Monad.Error.Class)
      
      which is equally wrong as it uses a package source ID rather than a package key
      (Haddock issue https://github.com/haskell/haddock/issues/362). Instead, we need
      to pass _both_ `--package-name` and `--package-version` to Haddock, and
      `-package-name` or `-this-package-key` to GHC, depending on the version.
      Thankfully the infrastructure for chosing between `-package-name` and
      `-this-package-key` is already in place, so we just have to make sure to
      populate the `ghcPackageKey` field. After this commit the link environment
      looks like
      
          (trans_H9c1w14lEUN3zdWCTsn8jG:Control.Monad.Trans.Error.strMsg, mtl_Koly6qxRZLf86guywd4tkE:Control.Monad.Error.Class)
      
      which is correct.
      3e78870d
  2. Mar 11, 2015
  3. Mar 10, 2015
  4. Mar 09, 2015
  5. Mar 08, 2015
  6. Mar 06, 2015
  7. Mar 04, 2015
  8. Mar 03, 2015
Loading