The instructions at <https://ghc.haskell.org/trac/ghc/wiki/Newcomers> were slightly outdated, and result in a rather confusing error messsage:
$ ./sync-all --testsuite get Unrecognised flag: --testsuite at ./sync-all line 872. == Checking for old haddock repo == Checking for old binary repo == Checking for old mtl repo == Checking for old Cabal repo == Checking for old time from tarball ============================ ATTENTION! You have an old time package in your GHC tree! Please remove it (e.g. "rm -r libraries/time"), and then run "./sync-all get" to get the new repository. ============================ == Checking for obsolete Git repo URL $ The patch corrects the error message. I've removed the --testsuite flag from the wiki page as well.
>From 1877358f8bd3fe47cc2035902d9c51351c79b443 Mon Sep 17 00:00:00 2001 From: Florian Weimer <[email protected]> Date: Thu, 13 Mar 2014 10:23:56 +0100 Subject: [PATCH] sync-all: Skip END actions on exceptions Before this change, the END actions were executed even if the code throws an exception using "die". This resulted in very confusing error reporting when an invalid command line option was specified. --- sync-all | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sync-all b/sync-all index 4b4b7a3..70c9639 100755 --- a/sync-all +++ b/sync-all @@ -7,6 +7,7 @@ use English; $| = 1; # autoflush stdout after each print, to avoid output after die my $initial_working_directory; +my $exit_via_die; my $defaultrepo; my @packages; @@ -956,6 +957,11 @@ BEGIN { } $initial_working_directory = getcwd(); + $SIG{__DIE__} = sub { + die @_ if $^S; + $exit_via_die = 1; + }; + #message "== Checking for left-over testsuite/.git folder"; if (-d "testsuite/.git") { print <<EOF; @@ -974,6 +980,7 @@ EOF } END { + return if $exit_via_die; my $ec = $?; chdir($initial_working_directory); -- 1.7.10.4
_______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
