1. 09 Jun, 2015 9 commits
    • thomie's avatar
      make sdist: distclean testsuite for real (#10406) · 5828457d
      thomie authored
      5828457d
    • thomie's avatar
      Build: run autoreconf jobs in parallel · 4a0b7a10
      thomie authored
      Running ./boot takes ~20 seconds on my laptop with 2 cores. With this change,
      that goes down to a little over 10 seconds. There are 8 configure.ac files in
      total, so max 8 parallel jobs.
      
      Differential Revision: https://phabricator.haskell.org/D962
      4a0b7a10
    • thomie's avatar
      Testsuite: delete expect_fail setups for ghc < 7.1 · 3445947a
      thomie authored
      This makes it easier to grep for expect_fail in the tests directory.
      
      Differential Revision: https://phabricator.haskell.org/D965
      3445947a
    • thomie's avatar
      Testsuite: delete expect_fail setups for hugs · 43ebe24a
      thomie authored
      This makes it easier to grep for expect_fail in the tests directory.
      
      Differential Revision: https://phabricator.haskell.org/D964
      43ebe24a
    • thomie's avatar
      Revert "The test runner now also works under the msys-native Python." · bb996712
      thomie authored
      To make the test runner work under msys-native Python...
      
      Commit 5258566e broke the msys testsuite
      driver (#10441). It changed the quoting of `config.compiler` from single
      quotes to double quote, which turns out to not be compatible with what
      the function `passThroughCmd` expected.
      
      We could fix `passThroughCmd` to handle the case where `config.compiler`
      is double quoted, and scatter some notes around to make sure the quoting
      done in various places of the testsuite driver stay compatible.
      
      Instead, this commit reverts 101c62e2,
      which introdced the function `passThroughCmd` in the first place
      (#9626). ezyang reports that doing this revert fixes the testsuite
      driver for him using the the following version of msys2:
      
        msys2-keyring r8.3864337-1
        msys2-runtime 2.1.0.16351.cd3184b-1
        msys2-runtime-devel 2.1.0.16351.cd3184b-1
        msys2-w32api-headers 5.0.0.4456.c8b6742-1
        msys2-w32api-runtime 5.0.0.4455.32db221-1
      
      Ideally we'd know what minimum version of msys2 we require, but for now
      this fix is better than nothing.
      
      Only gintas ever reported the original problem, and he actually
      mentioned shortly afterwards: "This may have been fixed by a recent
      release of msys2, but I am not sure."
      
      Differential Revision: https://phabricator.haskell.org/D952
      bb996712
    • Zejun Wu's avatar
      Always force the exception in enqueued commands · 3b55659d
      Zejun Wu authored
      `enqueueCommands` should always force exception in commands. Otherwise
      the exception thrown in `:cmd` (e.g. `:cmd return $ head []`) will cause
      GHCi to terminate with panic.
      
      Test Plan: `cd testsuite/tests/ghci/ && make`
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D967
      
      GHC Trac Issues: #10501
      3b55659d
    • Austin Seipp's avatar
      build: Clean testsuite before sdist · a48167ea
      Austin Seipp authored
      When making the `sdist` tarball, we don't really need anything inside
      $(TOP)/testsuite in order to do our thing. So make sure we clean it
      first to avoid situations like #10406.
      
      With D917 landed, this can actually avoided entirely by fixing the
      official release process to instead build an `sdist` //first// from the
      clean git repository and then build that (to fixpoint) and test it. Then
      the originall clean tarball can be shipped.
      
      But it's nice to be safe in the general case where someone might want to
      (in the future) `sdist` out of their build tree.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      
      Reviewed By: thomie
      
      Differential Revision: https://phabricator.haskell.org/D956
      
      GHC Trac Issues: #10406
      a48167ea
    • thomasw's avatar
      Refactor wild card renaming · 058af6c9
      thomasw authored
      Summary:
      Refactor wild card error reporting
      
      * Merge `HsWildcardTy` and `HsNamedWildcardTy` into one constructor
        `HsWildCardTy` with as field the new type `HsWildCardInfo`, which has two
        constructors: `AnonWildCard` and `NamedWildCard`.
      
      * All partial type checks are removed from `RdrHsSyn.hs` and are now done
        during renaming in order to report better error messages. When wild cards
        are allowed in a type, the new function `rnLHsTypeWithWildCards` (or
        `rnHsSigTypeWithWildCards`) should be used. This will bring the named wild
        cards into scope before renaming them. When this is not done, renaming will
        trigger "Unexpected wild card..." errors.
      
        Unfortunately, this has to be done separately for anonymous wild cards
        because they are given a fresh name during renaming, so they will not cause
        an out-of-scope error. They are handled in `tc_hs_type`, as a special case
        of a lookup that fails.
      
        The previous opt-out approach is replaced with an opt-in approach. No more
        panics because of forgotten checks!
      
      * `[t| _ |]` isn't caught by the above two checks, so it is currently handled
        by a special case. The error message (generated in the `DsM` monad) doesn't
        provide as much context information as the other cases.
      
      * Instead of three (!) functions that walk `HsType`, there is now only one
        pure function called `collectWildCards`.
      
      * Alternative approach: catch all unwanted wild cards in `rnHsTyKi` by looking
        at the `HsDocContext`. This will reduce the number of places to catch
        unwanted wild cards form three to one, and make the error messages more
        uniform, albeit less informative, as the error context for renaming is not
        as informative as the one for type checking. A new constructor of
        `HsDocContext` will be required for pattern synonyms signatures.
      
        Small problem: currently type-class type signatures can't be distinguished
        from type signatures using the `HsDocContext`.
      
      This requires an update to the Haddock submodule.
      
      Test Plan: validate
      
      Reviewers: goldfire, simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: bgamari, thomie, goldfire
      
      Differential Revision: https://phabricator.haskell.org/D613
      
      GHC Trac Issues: #10098
      058af6c9
    • Austin Seipp's avatar
      Revert "docs: Fix #10416" · 7944a68f
      Austin Seipp authored
      This causes the buildbots and other users to choke when building the
      user documentation, but I haven't figured out why.
      
      This reverts commit dcaaa980.
      7944a68f
  2. 08 Jun, 2015 1 commit
    • Simon Marlow's avatar
      Fix for CAF retention when dynamically loading & unloading code · 19ec6a84
      Simon Marlow authored
      In a situaion where we have some statically-linked code and we want to
      load and unload a series of objects, we need the CAFs in the
      statically-linked code to be retained indefinitely, while the CAFs in
      the dynamically-linked code should be GC'd as normal, so that we can
      detect when the code is unloadable.  This was wrong before - we GC'd
      CAFs in the static code, leading to a crash in the rare case where we
      use a CAF, GC it, and then load a new object that uses it again.
      
      I also did some tidy up: RtsConfig now has a field keep_cafs to
      indicate whether we want CAFs to be retained in static code.
      19ec6a84
  3. 06 Jun, 2015 3 commits
    • thomie's avatar
      Fix the build when SplitObjs=YES · 89223ce1
      thomie authored
      The default (perf) build, which sets SplitObjs=YES, was broken with
      commit 5dd02864.
      
      I accidently removed the wrong `endif`. This should fix it.
      89223ce1
    • thomie's avatar
      Fix the sdist build · 328c212b
      thomie authored
      Since commit 824e34e30338b4b1de0ab5467ffd29da4c7c805a, building ghc from
      a source distribution doesn't work.
      
      The error is:
      
          make[3]: *** No rule to make target
          'utils/genprimopcode/dist/build/Lexer.hs', needed by
          'utils/genprimopcode/dist/build/Lexer.o'.  Stop.
      
      This commit fixes that. See note [Implicit rule search algorithm].
      
      Differential Revision: https://phabricator.haskell.org/D959
      328c212b
    • thomie's avatar
      Testsuite: only show output diff when test is expected to pass · ae83a81a
      thomie authored
      Don't let the output of tests that either have missing libraries or are
      expected to be broken obscure real failures.
      
      This makes it easier to analyse the testlogs.
      
      The only consequence is that when a test fails because a certain library
      isn't installed, you have to check the all.T file in which the test is
      defined to actually find out _which_ library that is. Before it would
      print something like
      
          Compile failed (status 256) errors were:
      
          stm052.hs:10:8: error:
           Could not find module ‘System.Random’
           Use -v to see a list of the files searched for.
      
      And now it doesn't. I think this is an acceptable tradeoff.
      
      Differential Revision: https://phabricator.haskell.org/D945
      ae83a81a
  4. 05 Jun, 2015 4 commits
  5. 04 Jun, 2015 13 commits
    • thomie's avatar
      Travis: allow user forks · 7beb4771
      thomie authored
      Check for each submodule repository url if the user made its own fork.
      If so, use that. Otherwise, fall back on the one from github.com/ghc.
      
      As suggested by Richard in this mailinglist discussion:
      https://mail.haskell.org/pipermail/ghc-devs/2014-November/007300.html
      
      Documentation is at [wiki:TestingPatches#Travis].
      
      Differential Revision: https://phabricator.haskell.org/D939
      7beb4771
    • thomie's avatar
      Testsuite: don't show compile/link info for some tests · 0686d76f
      thomie authored
      This info is not needed in the testlogs, and was actually making these
      tests fail on my machine because of some bug with the timeout program:
      ...
      [1 of 1] Compiling Main ( OutOfHeap.hs, tmp_T9579_outofheap_rtssome/Main.o )
      Linking T9579_outofheap_rtsnone ...
      ...
      0686d76f
    • thomie's avatar
      Testsuite: ignore `stdcall attribute ignored` (#1288) · 07feab19
      thomie authored
      That warning is only shown on some platforms, and is I believe harmless.
      07feab19
    • thomie's avatar
      Testsuite: add/fix cleanup for certain tests · e340f6ec
      thomie authored
      * extra_clean argument should be a list
        Add an assert to prevent regressions.
      
      * properly clean package conf direcories
        They are directories now, which was causing problems.
      
      * properly clean write_interface_* tests
        We were getting these errors:
      
        [Errno 21] Is a directory: './driver/write_interface_oneshot'
        [Errno 39] Directory not empty: './driver/write_interface_oneshot'
        [Errno 21] Is a directory: './driver/write_interface_make'
        [Errno 39] Directory not empty: './driver/write_interface_make'
      
      * outputdir() is better than -outputdir, as it knows how to (pre)clean
        itself.
      e340f6ec
    • thomie's avatar
      Make validate more quiet · d0063e89
      thomie authored
        * By default use V=0, and call the testsuite with VERBOSE=2, which we
          did before only with validate --quiet. This disables printing the
          test commands it runs.
      
        * When --quiet is used, call the testsuite with VERBOSE=1. This
          disables printing the '====> Scanning' lines, and doesn't print
          which test is being run. So it only prints something when a test
          accidentally prints to stdout or when it fails.
      
          Don't set this option on Travis, as Travis will cancel a build if it
          doesn't see any output for more than 10 minutes.
      
        * When --quiet is used, set the new test option NO_PRINT_SUMMARY,
          which skips printing the test summary. Only the list of unexpected
          failures is printed, if there are any. Note that the full summary
          can still be found in testsuite_summary.txt
      
        * When --quiet is used, don't pass the `-v` flag to `ghc-pkg check`
      
        * When --quiet is used, don't print the Oops! header. It shoud be
          clear from the list of failing tests that something is wrong.
      
      This is all done to get the most out of 30 lines of logfile. These changes can
      be disabled later by simply not passing the --quiet flag to validate.
      
      Differential Revision: https://phabricator.haskell.org/D942
      d0063e89
    • thomie's avatar
      Build: remove more unnecessary CLEANING/=YES checks · 5dd02864
      thomie authored
      All these checks that CLEANING/=YES are no longer needed, because
      nowadays $1_$2_PROGNAME is always set explicitly, and $1_$2_PROG isn't.
      
      They were once introduce to allow `make clean` before `./configure`. I
      checked, and it still works.
      
      Remove the checks to make the build system a tiny bit shorter, and to
      no longer wonder why they are there.
      
      Differential Revision: https://phabricator.haskell.org/D941
      5dd02864
    • thomie's avatar
      Build: remove unnecessary CLEANING/=YES check · cac68d0d
      thomie authored
      The comment "INPLACE_BIN might be empty if we're distcleaning" is no
      longer true, and the check that CLEANING isn't YES isn't necessary.
      
      It was introduced in cd12c32d, to
      "make repeated 'make distclean' not fail", and and later revised in
      39253008. It was needed because
      INPLACE_BIN was defined in config.mk.
      
      Commit 6793a033 however, two days
      later, introduced a better solution to this problem: "Move the fixed
      paths out of config.mk, so cleaning works without configuring"
      
      So here we remove the original comment and check. One less thing to
      worry about when trying to understand the build system.
      
      Differential Revision: https://phabricator.haskell.org/D940
      cac68d0d
    • thomie's avatar
      Build: ./boot && ./configure && make sdist (#8723) · 092082e7
      thomie authored
      Make it possible to run `make sdist` right after configure, without completing
      a complete build first.
      
      Test Plan:
      I compared the contents of the created `.tar.bz2` files in the `sdistprep`
      directory, after running `make sdist` both before and after completing a full
      build, using `diff -r`. There weren't any differences (after applying the
      patches from D914).
      
      Note that the `.tar.bz2` files were not exactly the same size, but they aren't
      either when tarring and bzipping the same directory twice. It seems tarring
      and bzipping is not deterministic (on my system).
      
      Differential Revision: https://phabricator.haskell.org/D917
      092082e7
    • thomie's avatar
      ghc-cabal: don't warn about missing cabal fields · 14652b51
      thomie authored
      Only print and exit on errors. Warnings of the type
      'PackageDistSuspicious' are not very useful.
      
      The following show up in the build logs currently:
        * The 'license' field is missing.
        * No 'maintainer' field
        * No 'category' field
        * 'ghc-options: -O2' is rarely needed. Check that it is giving a real
          benefit and not just imposing longer compile times on your users.
      
      Differential Revision: https://phabricator.haskell.org/D944
      14652b51
    • thomie's avatar
      Build: make configure and ghc-pkg a bit less chatty · 75c6e068
      thomie authored
      Only when V=0.
      
      Differential Revision: https://phabricator.haskell.org/D943
      75c6e068
    • thomie's avatar
      Re-center perf numbers for haddock.compiler · d8f66f1b
      thomie authored
      Summary:
      Phabricator/Harbormaster measured the following allocation numbers for
      haddock.compiler:
      
      Expected:     33562468736
      June 2nd [1]: 36740649320
      Upper bound:  36918715610
      June 3rd [2]: 36956620504
      
      So although this test didn't start failing until June 2nd/3rd, the
      biggest increase in allocation must have occured sometime before that.
      
      [1] 2f0011ac
      [2] 942cfa4e
      
      Test Plan: validate
      
      Reviewers: austin
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D948
      d8f66f1b
    • Edward Z. Yang's avatar
      ghc-pkg support query by package-key, fixes #9507 · c69b69d2
      Edward Z. Yang authored
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: austin
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D946
      
      GHC Trac Issues: #9507
      c69b69d2
    • Joachim Breitner's avatar
      Travis: Send notifications to author and commiter · 21d7c85d
      Joachim Breitner authored
      This is the Travis default. It should only spam people who have an
      GitHub account and are a member of the ghc organization on GitHub, as
      noted by thomie on https://phabricator.haskell.org/D939#25497. Let's see
      how that works out.
      21d7c85d
  6. 03 Jun, 2015 4 commits
  7. 02 Jun, 2015 6 commits