This project is mirrored from Pull mirroring updated .
  1. 05 Nov, 2015 1 commit
  2. 09 Oct, 2015 1 commit
    • Edward Z. Yang's avatar
      Implement ComponentId, replacing PackageKey and InstalledPackageId. · b083151f
      Edward Z. Yang authored
      Today in Cabal, when you build and install a package, it is
      uniquely identified using an InstalledPackageId which is computed
      using the ABI hash of the library that was installed.  There
      are few problems with doing it this way:
          - In a Nix-like world, we should instead uniquely identify
            build products by some sort of hash on the inputs to the
            compilation (source files, dependencies, flags).  The ABI
            hash doesn't capture any of this!
          - An InstalledPackageId suggests that we can uniquely identify
            build products by hashing the source and dependencies of
            a package as a whole.  But Cabal packages contain many components:
            a library, test suite, executables, etc.  Currently, when
            we say InstalledPackageId, we are really just talking about
            the dependencies of the library; however, this is unacceptable
            if a Cabal package can install multiple libraries; we need
            different identifiers for each.
          - We've also needed to compute another ID, which we've called
            the "package key", which is to be used for linker symbols
            and type equality GHC-side.  It is confusing what the distinction
            between this ID and InstalledPackageIds are; the main reason
            we needed another ID was because the package key was needed
            prior to compilation, whereas the ABI hash was only available
      This patch replaces InstalledPackageId and PackageKey with a
      new identifier called ComponentId, which has the following
          - It is computed per-component, and consists of a package
            name, package version, hash of the ComponentIds
            of the dependencies it is built against, and the name
            of the component.  For example, "foo-0.1-abcdef" continues
            to identify the library of package foo-0.1, but
            "foo-0.1-123455-foo.exe" would identify the executable,
            and "foo-0.1-abcdef-bar" would identify a private sub-library
            named bar.
          - It is passed to GHC to be used for linker symbols and
            type equality.  So as far as GHC is concerned, this is
            the end-all be-all identifier.
          - Cabal the library has a simple, default routine for computing
            a ComponentId which DOES NOT hash source code;
            in a later patch Duncan is working on, cabal-install can
            specify a more detailed ComponentId for a package
            to be built with.
      Here are some knock-on effects:
          - 'id' is a ComponentId
          - 'depends' is now a list of ComponentIds
          - New 'abi' field to record what the ABI of a unit is (as it is no longer
            computed by looking at the output of ghc --abi-hash).
          - The 'HasInstalledPackageId' typeclass is renamed to
          - GHC 7.10 has explicit compatibility handling with
            a 'compatPackageKey' (an 'ComponentId') which is
            in a compatible format.  The value of this is read out
            from the 'key' field.
      Signed-off-by: default avatarEdward Z. Yang <>
  3. 26 Sep, 2015 1 commit
    • enolan's avatar
      Carry package dbs into testsuite · bc3e1a7d
      enolan authored
      Prior to this patch, the testsuite used your global package db, and
      sometimes, the inplace package db, which led to errors if you didn't
      have old-time installed globally. They looked like this:
      BuildDeps/SameDepsAllRound:          Cabal result was Result {successful = False, success = Failure, outputText = "\"/home/enolan/cabal/Cabal/tests/Setup configure --user -w  /home/enolan/.nix-profile/bin/ghc\" in PackageTests/BuildDeps/SameDepsAllRound\nConfiguring SameDepsAllRound-0.1...\nSetup: At least the following dependencies are missing:\nold-time -any\n"}
  4. 08 Aug, 2015 4 commits
  5. 29 Jun, 2015 1 commit
  6. 29 Mar, 2015 1 commit
    • Ian Ross's avatar
      Allow preprocessors to specify extra C sources · a30b11fe
      Ian Ross authored
      Add functionality to allow preprocessors like hsc2hs and C2HS to inform
      Cabal of extra C sources that they create that need to be compiled and
      linked.  Includes hsc2hs-based test case.
  7. 20 Mar, 2015 1 commit
  8. 18 Dec, 2014 2 commits
    • ttuegel's avatar
      PackageTests: set dist prefix · 61f97e07
      ttuegel authored
      Some package tests run multiple tests on the same package, causing the
      build directory to be overwritten. For debugging, it is important to
      keep the build directory contents, so in this case we run each test
      with a different build directory.
    • ttuegel's avatar
      PackageTests: add full range of TestSuite/Hpc tests · 6af70b39
      ttuegel authored
      Also runs the HPC tests regardless of the detected version.
  9. 09 Dec, 2014 1 commit
    • ttuegel's avatar
      getConfigStateFile: throw meaningful exceptions, recover old LBI · 78776496
      ttuegel authored
      getConfigStateFile now throws meaningful exceptions which are caught by
      tryGetConfigStateFile and friends, which are allowed to propagate,
      rather than just calling 'die'. If the LocalBuildInfo was generated by
      an older version of Cabal, an exception is still generated, but the
      LocalBuildInfo is included if it is recoverable. This feature is used to
      reduce code duplication between the library and the test suite.
  10. 14 Sep, 2014 1 commit
  11. 30 Aug, 2014 1 commit
    • ttuegel's avatar
      Load binary LocalBuildInfo in package-tests · a86ad66c
      ttuegel authored
      PackageTests has its own version of getPersistBuildConfig which does not
      check which version of Cabal created dist/setup-config. Now that the
      LocalBuildInfo is written with Binary, this version needed to be
      updated, too.
  12. 16 Jul, 2014 1 commit
    • Edward Z. Yang's avatar
      Implement "reexported-modules" field, towards fixing GHC bug #8407. · 62450f9a
      Edward Z. Yang authored
      Re-exported modules allow packages to reexport modules from their
      dependencies without having to create stub files.  Reexports of the same
      original module don't count as ambiguous imports when module finding
      occurs.  The syntax is:
          "orig-pkg" OrigName as NewName
      You can omit 'as NewName', in which case it is reexported as the same
      name.  Self referential aliases work too; however, they're only visible
      to packages which depend on this package.
      Left to future work: just provide a module name 'OrigName', where ghc-pkg
      figures out what the source package is.
      Signed-off-by: default avatarEdward Z. Yang <>
  13. 11 Jul, 2014 1 commit
  14. 10 May, 2014 1 commit
  15. 19 Mar, 2014 1 commit
  16. 12 Feb, 2014 2 commits
  17. 09 Feb, 2014 1 commit
  18. 05 Feb, 2014 1 commit
  19. 20 Dec, 2013 1 commit
  20. 06 Nov, 2013 1 commit
  21. 27 Aug, 2013 1 commit
    • tibbe's avatar
      Unit tests: use configure GHC · 323460ec
      tibbe authored
      This means that the package tests will pick up whatever GHC was passed
      on the
          cabal configure --enable-tests -w some-ghc
      command line.
  22. 11 Jul, 2013 1 commit
  23. 07 May, 2013 1 commit
  24. 28 Apr, 2013 2 commits
  25. 21 Mar, 2013 2 commits
  26. 10 Dec, 2012 1 commit
    • Duncan Coutts's avatar
      Support for C/C++/Obj-C as main · de88f409
      Duncan Coutts authored
      This allows specifying the main-is field as a C file.
      This is closely based on patches by Edward Z. Yang, who in turn credits
      and earlier set of patches by Irene Knapp. The slight difference in
      this version of the patch is that it is adjusted to work with the new
      approach where we have separate hs compile; c compile; and link phases.
  27. 30 Oct, 2012 2 commits
  28. 26 Oct, 2012 5 commits