Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Jul 30, 2015
  2. Jul 29, 2015
  3. Jul 21, 2015
    • Edward Z. Yang's avatar
      Refactor Cabal around the idea of "library names". · f47732a5
      Edward Z. Yang authored
      
      In GHC 7.10, Cabal always generate package keys, including in
      cases where Backpack was involved (e.g. --instantiated-with).
      In fact, in these case, GHC needs to be able to generate the
      package key (because it will often make a substitution on the
      instantiation, and needs to know if this identity coincides with
      anything else we've seen previously).
      
      Thus, we introduce a new notion, the 'LibraryName', which
      is JUST the non-Backpack portion of a package key.  For ordinary
      packages that are definite, a 'LibraryName' is simply
      the 'PackageId' plus 'PackageKey'; for indefinite Backpack packages,
      when a package gets instantiatied, it may end up with different
      'PackageKey's even though the 'LibraryName' stays the same.
      'LibraryName's can be computed purely by Cabal.
      
      This patch:
      
          - Defines library name, which are the source package ID plus
            a hash of all the source package ID and the library names of external,
            textual dependencies,
      
          - Redefines the package key to be JUST the hash portion of a
            library name, in the case that Backpack is not used,
      
          - Records the library name in InstalledPackageInfo.
      
      Note: the source package ID is included both externally (so the library
      name is a useful handle to refer to package) and internally (so the
      hash can stand alone as the package key.)
      
      A major refactoring which is part of this commit is moving package keys/library
      names from LocalBuildInfo to LibComponentBuildInfo.  If you have an LBI, you can
      still extract a package key/library name using the new
      localPackageKey/localLibraryName function (which looks through the
      ComponentBuildInfos of a LocalBuildInfo for the library in question).  This is
      conceptually cleaner for two reasons:
      
          1. Only dependencies of the *library* are counted as part
          of the library name, as opposed to *all* dependencies which
          we previously used.
      
          2. A library name doesn't really mean much for an executable,
          or a test suite, since no one else will have to link against
          them.  So we can fall back on something simpler.
      
      A more minor refactoring is the 'LibraryName' type, which was
      previously defined by LocalBuildInfo and generally looked something
      like "HSprocess-0.1-XXXX".  We change the meaning of 'LibraryName'
      to be "process-0.1-XXXX" (thus we have to insert some HS additions
      in the code) and eliminate componentLibraries, thus assuming that
      there is only ONE Haskell library (which was the case.)  So
      we remove a little bit of generality and in return get code
      that is much easier to read.  (The only downside is GHC's hack
      to split DLLs into multiples has to be adjusted slightly, but
      this is not a big price to pay.)
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      f47732a5
  4. Jul 20, 2015
  5. Jul 07, 2015
  6. Jul 06, 2015
  7. Jul 05, 2015
    • Oleg Grenrus's avatar
      Fix #2704 · f9467833
      Oleg Grenrus authored
      Code branch with zlib <0.6 cannot recognise the uncompressed input.
      f9467833
  8. Jul 04, 2015
  9. Jul 03, 2015
  10. Jul 02, 2015
  11. Jun 29, 2015
  12. Jun 27, 2015
  13. Jun 20, 2015
  14. Jun 19, 2015
    • kristenk's avatar
      Compare file paths with equalFilePath for portability · 7c50bfe5
      kristenk authored
      Without this change, differences in filename capitalization caused "cabal
      sandbox delete" to fail with this error message when used with a default
      sandbox on Windows:
      
      cabal.exe: Non-default sandbox location used:
      'C:\folder\.cabal-sandbox'.
      Assuming a shared sandbox. Please delete
      'C:\folder\.cabal-sandbox' manually.
      
      This commit also allows the cabal-install package tests that delete sandboxes
      to run on Windows.
      7c50bfe5
    • kristenk's avatar
      Test cabal exec error message in a more portable way · 99a9611f
      kristenk authored
      This change allows the tests "can run executables installed in the sandbox" and
      "adds the sandbox bin directory to the PATH" to run on Windows by removing the
      executable name from the required error message.
      99a9611f
Loading