This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 08 Apr, 2016 5 commits
  2. 01 Apr, 2016 2 commits
    • Edward Z. Yang's avatar
      Fix build-tools ordering regression (#3257, #1541) · e3a3b01b
      Edward Z. Yang authored
      
      
      When converting the component graph to operate in terms of UnitIds
      instead of CNames I accidentally introduced a regression where we
      stopped respecting build-tools when determining an ordering to
      build things.  This commit fixes the regression (though perhaps
      not in the most clean/performant way you could manage it.)  It
      also fixes a latent bug if internal libraries aren't processed
      in the correct order.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      e3a3b01b
    • Edward Z. Yang's avatar
      Testing with GHC 7.0 and 7.2. · 2d388c06
      Edward Z. Yang authored
      
      
      In the process, I refactored the test suite a bit to be more robust
      and handle the --with-compiler more correctly in most cases.
      
      One note: I turned off the HPC tests with the GHC and WITH_GHC
      parameters don't match.  In principle this should work but there
      is some sort of bug.  I don't plan on fixing the bug.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      2d388c06
  3. 29 Mar, 2016 9 commits
  4. 06 Mar, 2016 1 commit
  5. 28 Feb, 2016 2 commits
  6. 22 Feb, 2016 3 commits
  7. 20 Feb, 2016 1 commit
  8. 19 Feb, 2016 2 commits
  9. 15 Feb, 2016 1 commit
  10. 14 Feb, 2016 2 commits
  11. 08 Feb, 2016 2 commits
  12. 16 Jan, 2016 1 commit
    • Edward Z. Yang's avatar
      Distinguish between component ID and unit ID. · ef41f44e
      Edward Z. Yang authored
      
      
      GHC 8.0 is switching the state sponsored way to specify
      linker names from -this-package-key to -this-unit-id, so
      it behooves us to use the right one.  But it didn't make
      much sense to pass ComponentIds to a flag named UnitId,
      so I went ahead and finished a (planned) refactoring
      to distinguish ComponentIds from UnitIds.
      
      At the moment, there is NO difference between a ComponentId
      and a UnitId; they are identical.  But semantically, a
      component ID records what sources/flags we chose (giving us enough
      information to typecheck a package), whereas a unit ID records
      the component ID as well as how holes were instantiated
      (giving us enough information to build it.)  MOST code
      in the Cabal library wants unit IDs, but there are a few
      places (macros and configuration) where we really do
      want a component ID.
      
      Some other refactorings that got caught up in here:
      
          - Changed the type of componentCompatPackageKey to String, reflecting the
            fact that it's not truly a UnitId or ComponentId.
      
          - Changed the behavior of CURRENT_PACKAGE_KEY to unconditionally
            give the compatibility package key, which is actually what you
            want if you're using it for the template Haskell trick.  I also
            added a CURRENT_COMPONENT_ID macro for the actual component ID,
            which is something that the Cabal test-suite will find useful.
      
          - Added the correct feature test for GHC 8.0 ("Uses unit IDs").
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      ef41f44e
  13. 14 Jan, 2016 1 commit
  14. 10 Jan, 2016 2 commits
    • Edward Z. Yang's avatar
      d1961590
    • Edward Z. Yang's avatar
      Properly assign component ID/build dir for LibV09 test libraries · 18fcd9c1
      Edward Z. Yang authored
      
      
      Cabal's LibV09 support has always been a bit skeevy.  The general
      idea was that a detailed-0.9 test-suite is built as a library
      and an Cabal-provided stub executable.  In particular, the test suite
      library must be installed to the installed package database so that the
      executable can be compiled.
      
      Old versions of Cabal did something very skeevy here:  they installed
      the test library as a "package", with the same package name as
      the "test-suite" stanza; furthermore, they built the products
      into the same directory as the library proper.
      
      Consequently, a lot of bad things could happen (both of which I've
      added tests for):
      
          1. If the name of the test suite and the name of some other
          package coincide (and have the same version), they will clobber
          each other.  In GHC 7.8 and earlier, this just flat out
          kills the build, because it will shadow.  There's an explicit
          test to make sure test suites don't conflict with the package
          name, but you can get unlucky.
      
          2. The test suite library is built into the same directory
          as the main library, which means that if the test library
          implements the same module name as something in the main
          library it will clobber the interface file and badness
          will ensue.
      
      This patchset fixes both of these issues, by (1) giving internal
      test libraries proper names which are guaranteed to be unique
      up to Cabal's dependency resolution, and (2) building the test
      suite library into a separate directory.
      
      In doing so, it also lays the groundwork for other types of
      internal libraries, e.g. #269, as well as extra (invisible)
      libraries which we may install.
      
      For GHC 7.8 and earlier, we follow the reserved namespace
      convention as per #3017.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      18fcd9c1
  15. 29 Dec, 2015 1 commit
  16. 28 Dec, 2015 2 commits
    • Edward Z. Yang's avatar
      Failing test for #3004. · 0e4d34e2
      Edward Z. Yang authored
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      0e4d34e2
    • Edward Z. Yang's avatar
      Rewrite the package test suite. · e94552e8
      Edward Z. Yang authored
      
      
      I've rewritten the test suite to be more concise and "correct by
      construction".  The primary method that this is achieved by
      is introducing the 'TestM' monad, which carries around the
      important state for the tests so that (1) we don't have to
      pass it as an argument all around, and (2) we can automatically
      make the correct decisions about how to do things.  This new
      method emphasises "configuration by convention": we assume
      that a test-case named "Foo" has its test packages in the
      directory "tests/PackageTests/Foo".
      
      A secondary change is that all command functions automatically fail if
      they have a non-zero exit code (unless you use the 'shouldFail'
      combinator which inverts the sense.)  This saves a lot of typing
      on test-cases.  (In fact, I've reorganized all of the commands
      related here.)
      
      In the process, I've tightened up the logic for how to find the
      LocalBuildInfo of the Cabal we've testing, so we should now
      reliably be testing the inplace Cabal library, and not the
      system library (as was often the case.)
      
      Because things are a lot shorter, there is no good reason to
      make Check modules except for the biggest test cases.  Most
      test-cases have been folded into PackageTests.Tests; if you
      have a small test-case you should just put it there.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      e94552e8
  17. 23 Dec, 2015 1 commit
  18. 07 Nov, 2015 1 commit
    • Joachim Breitner's avatar
      test: New mode --show-details=direct · 2542325e
      Joachim Breitner authored
      This mode implements #2911, and allows to connect the test runner
      directly to stdout/stdin. This is more reliable in the presence of no
      threading, i.e. a work-arond for #2398.
      
      I make the test suite use this, so that it passes again, despite
      printing lots of stuff. Once #2398 is fixed properly, the test suite
      should probably be extended to test all the various --show-details
      modes.
      2542325e
  19. 05 Nov, 2015 1 commit
    • Joachim Breitner's avatar
      PackageTests/TestSuiteTests/ExeV10: Have large output · 8ec416cf
      Joachim Breitner authored
      The test case is changed to print a rather large amount of text, large
      enough to fill a buffer. This way, the buffer draining functionality in
      the test runner is tested, and it reveals #2398.
      
      This makes the test suite currently fail, of course, but the bug was
      there before.
      8ec416cf