[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Hadrian: fix binary-dir with --docs=none

Marge Bot gitlab at gitlab.haskell.org
Fri Apr 12 17:07:20 UTC 2019



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
c401f8a4 by Sylvain Henry at 2019-04-11T23:51:24Z
Hadrian: fix binary-dir with --docs=none

Hadrian's "binary-dist" target must check that the "docs" directory
exists (it may not since we can disable docs generation).

- - - - -
091195a4 by Ömer Sinan Ağacan at 2019-04-11T23:57:38Z
Remove unused remilestoning script

- - - - -
fa0ccbb8 by Ömer Sinan Ağacan at 2019-04-11T23:57:38Z
Update a panic message

Point users to the right URL

- - - - -
4c07fa61 by Sylvain Henry at 2019-04-12T17:07:14Z
Hadrian: fix ghci wrapper script generation (#16508)

- - - - -
93c42be4 by Ben Gamari at 2019-04-12T17:07:15Z
gitlab-ci: Ensure that version number has three components

- - - - -


12 changed files:

- .gitlab-ci.yml
- + .gitlab/linters/check-version-number.sh
- compiler/ghci/ByteCodeLink.hs
- configure.ac
- − distrib/remilestoning.pl
- hadrian/src/Rules/BinaryDist.hs
- testsuite/tests/rts/T11223/T11223_link_order_a_b_2_fail.stderr
- testsuite/tests/rts/T11223/T11223_link_order_a_b_2_fail.stderr-ws-32-mingw32
- testsuite/tests/rts/T11223/T11223_link_order_a_b_2_fail.stderr-ws-64-mingw32
- testsuite/tests/rts/T11223/T11223_simple_duplicate_lib.stderr
- testsuite/tests/rts/T11223/T11223_simple_duplicate_lib.stderr-ws-32-mingw32
- testsuite/tests/rts/T11223/T11223_simple_duplicate_lib.stderr-ws-64-mingw32


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -59,6 +59,7 @@ ghc-linters:
     - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA)
     - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA
     - .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA
+    - .gitlab/linters/check-version-number.sh
   dependencies: []
   tags:
     - lint


=====================================
.gitlab/linters/check-version-number.sh
=====================================
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -e
+
+grep -e -q '\[[0-9]+\.[0-9]+\.[0-9]+\]' configure.ac ||
+  ( echo "error: configure.ac: GHC version number must have three components."; exit 1 )


=====================================
compiler/ghci/ByteCodeLink.hs
=====================================
@@ -154,8 +154,8 @@ linkFail who what
                 , "the missing library using the -L/path/to/object/dir and -lmissinglibname"
                 , "flags, or simply by naming the relevant files on the GHCi command line."
                 , "Alternatively, this link failure might indicate a bug in GHCi."
-                , "If you suspect the latter, please send a bug report to:"
-                , "  glasgow-haskell-bugs at haskell.org"
+                , "If you suspect the latter, please report this as a GHC bug:"
+                , "  https://www.haskell.org/ghc/reportabug"
                 ])
 
 


=====================================
configure.ac
=====================================
@@ -13,7 +13,7 @@ dnl
 # see what flags are available. (Better yet, read the documentation!)
 #
 
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.9], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.9.0], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
 
 # Set this to YES for a released version, otherwise NO
 : ${RELEASE=NO}


=====================================
distrib/remilestoning.pl deleted
=====================================
@@ -1,119 +0,0 @@
-#!/usr/bin/env perl
-
-use warnings;
-use strict;
-
-use DBI;
-
-# ===== Config:
-
-my $dbfile = "trac.db";
-my $milestone = "7.4.1";
-my $test = 0;
-
-# ===== Code:
-
-my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","", {});
-
-my %emailof;
-my %ticketsfor;
-
-sub getUserAddress {
-    my $sth = $dbh->prepare("SELECT sid, value FROM session_attribute WHERE name = 'email'");
-    $sth->execute();
-    while (my $result = $sth->fetchrow_hashref("NAME_lc")) {
-        my $username = $result->{sid};
-        my $email    = $result->{value};
-        if (defined($emailof{$username})) {
-            die "Two e-mail addresses found for $username";
-        }
-        if ($email =~ /@/) {
-            $emailof{$username} = $email;
-        }
-        else {
-            # warn "The e-mail address $email for $username contains no @";
-        }
-    }
-    $sth->finish;
-}
-
-sub doTickets {
-    my $sth = $dbh->prepare("SELECT id, summary, reporter, cc FROM ticket WHERE milestone = ? AND status = 'new'");
-    $sth->execute($milestone);
-    while (my $result = $sth->fetchrow_hashref("NAME_lc")) {
-        my $ticket   = $result->{id};
-        my $title    = $result->{summary};
-        my $reporter = $result->{reporter};
-        my $cc       = $result->{cc};
-        my %addresses;
-        my $address_added;
-        for my $who ($reporter, split /[ ,]+/, $cc) {
-            $address_added = 0;
-            if ($who =~ /@/) {
-                $addresses{$who} = 1;
-                $address_added = 1;
-            }
-            if (defined($emailof{$who})) {
-                $addresses{$emailof{$who}} = 1;
-                $address_added = 1;
-            }
-            if ($who ne "nobody" && $address_added eq 0) {
-                # warn "No address found for $who";
-            }
-        }
-        for my $address (keys(%addresses)) {
-            $ticketsfor{$address}{$ticket}{"title"} = $title;
-        }
-    }
-    $sth->finish;
-}
-
-sub doEmails {
-    for my $email (sort (keys %ticketsfor)) {
-        if ($test ne 0) {
-            open FH, ">&STDOUT";
-        }
-        else {
-            open(FH, '|-', 'mail', '-s', 'GHC bugs', '-a', 'From: glasgow-haskell-bugs at haskell.org', $email) or die "Running mail failed: $!";
-        }
-        print FH <<'EOF';
-
-Hello,
-
-You are receiving this mail because you are the reporter, or on the CC
-list, for one or more GHC tickets that are automatically having their
-priority reduced due to our post-release ticket handling policy:
-    https://gitlab.haskell.org/ghc/ghc/wikis/working-conventions/bug-tracker#re-milestoning-tickets-after-a-release
-
-The list of tickets for which you are the reporter or on the CC list is
-given below. If any of these are causing problems for you, please let us
-know on glasgow-haskell-bugs at haskell.org and we'll look at raising the
-priority.
-
-Better still, if you are able to make any progress on any of the tickets
-yourself (whether that be actually fixing the bug, or just making it
-easier for someone else to - for example, by making a small,
-self-contained test-case), then that would be a great help. We at GHC HQ
-have limited resources, so if anything is waiting for us to make
-progress then it can be waiting a long time!
-EOF
-        for my $ticket (sort {$a <=> $b} (keys %{$ticketsfor{$email}})) {
-            my $title = $ticketsfor{$email}{$ticket}{"title"};
-            print FH "\n";
-            print FH "#$ticket $title:\n";
-            print FH "    https://gitlab.haskell.org/ghc/ghc/issues/$ticket\n";
-        }
-        print FH <<'EOF';
-
---
-The GHC Team
-http://www.haskell.org/ghc/
-EOF
-        close FH or die "Close failed: $!";
-    }
-}
-
-&getUserAddress();
-&doTickets();
-&doEmails();
-


=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -121,7 +121,13 @@ bindistRules = do
         copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir
         copyDirectory (rtsIncludeDir)         bindistFilesDir
         need ["docs"]
-        copyDirectory (root -/- "docs") bindistFilesDir
+        -- TODO: we should only embed the docs that have been generated
+        -- depending on the current settings (flavours' "ghcDocs" field and
+        -- "--docs=.." command-line flag)
+        -- Currently we embed the "docs" directory if it exists but it may
+        -- contain outdated or even invalid data.
+        whenM (doesDirectoryExist (root -/- "docs")) $ do
+          copyDirectory (root -/- "docs") bindistFilesDir
         when windows $ do
           copyDirectory (root -/- "mingw") bindistFilesDir
           -- we use that opportunity to delete the .stamp file that we use
@@ -141,7 +147,7 @@ bindistRules = do
                    (["configure", "Makefile"] ++ bindistInstallFiles)
         need $ map ((bindistFilesDir -/- "wrappers") -/-) ["check-api-annotations"
                    , "check-ppr", "ghc", "ghc-iserv", "ghc-pkg"
-                   , "ghci-script", "ghci", "haddock", "hpc", "hp2ps", "hsc2hs"
+                   , "ghci-script", "haddock", "hpc", "hp2ps", "hsc2hs"
                    , "runghc"]
 
         -- Finally, we create the archive <root>/bindist/ghc-X.Y.Z-platform.tar.xz
@@ -287,9 +293,8 @@ bindistMakefile = unlines
     , "\tdone"
     , ""
     , "install_ghci:"
-    , "\t at echo \"Copying and installing ghci\""
-    , "\t$(CREATE_SCRIPT) '$(WrapperBinsDir)/ghci'"
-    , "\t at echo \"#!$(SHELL)\" >>  '$(WrapperBinsDir)/ghci'"
+    , "\t at echo \"Installing ghci wrapper\""
+    , "\t at echo \"#!$(SHELL)\" >  '$(WrapperBinsDir)/ghci'"
     , "\tcat wrappers/ghci-script >> '$(WrapperBinsDir)/ghci'"
     , "\t$(EXECUTABLE_FILE) '$(WrapperBinsDir)/ghci'"
     , ""
@@ -325,6 +330,7 @@ bindistMakefile = unlines
     , "\t\t$(call installscript,$p,$(WrapperBinsDir)/$p," ++
       "$(WrapperBinsDir),$(ActualBinsDir),$(ActualBinsDir)/$p," ++
       "$(ActualLibsDir),$(docdir),$(includedir)))"
+    , "\trm -f '$(WrapperBinsDir)/ghci-script'" -- FIXME: we shouldn't generate it in the first place
     , ""
     , "PKG_CONFS = $(wildcard $(ActualLibsDir)/package.conf.d/*)"
     , "update_package_db:"
@@ -350,7 +356,6 @@ bindistMakefile = unlines
 wrapper :: FilePath -> String
 wrapper "ghc"         = ghcWrapper
 wrapper "ghc-pkg"     = ghcPkgWrapper
-wrapper "ghci"        = ghciWrapper
 wrapper "ghci-script" = ghciScriptWrapper
 wrapper "haddock"     = haddockWrapper
 wrapper "hsc2hs"      = hsc2hsWrapper
@@ -367,9 +372,6 @@ ghcPkgWrapper = unlines
     [ "PKGCONF=\"$libdir/package.conf.d\""
     , "exec \"$executablename\" --global-package-db \"$PKGCONF\" ${1+\"$@\"}" ]
 
-ghciWrapper :: String
-ghciWrapper = "exec \"$executablename\" --interactive \"$@\"\n"
-
 haddockWrapper :: String
 haddockWrapper = "exec \"$executablename\" -B\"$libdir\" -l\"$libdir\" ${1+\"$@\"}\n"
 


=====================================
testsuite/tests/rts/T11223/T11223_link_order_a_b_2_fail.stderr
=====================================
@@ -20,6 +20,6 @@ archives or DLLs needed by your current session.  Restart GHCi, specifying
 the missing library using the -L/path/to/object/dir and -lmissinglibname
 flags, or simply by naming the relevant files on the GHCi command line.
 Alternatively, this link failure might indicate a bug in GHCi.
-If you suspect the latter, please send a bug report to:
-  glasgow-haskell-bugs at haskell.org
+If you suspect the latter, please report this as a GHC bug:
+  https://www.haskell.org/ghc/reportabug
 


=====================================
testsuite/tests/rts/T11223/T11223_link_order_a_b_2_fail.stderr-ws-32-mingw32
=====================================
@@ -20,6 +20,6 @@ archives or DLLs needed by your current session.  Restart GHCi, specifying
 the missing library using the -L/path/to/object/dir and -lmissinglibname
 flags, or simply by naming the relevant files on the GHCi command line.
 Alternatively, this link failure might indicate a bug in GHCi.
-If you suspect the latter, please send a bug report to:
-  glasgow-haskell-bugs at haskell.org
+If you suspect the latter, please report this as a GHC bug:
+  https://www.haskell.org/ghc/reportabug
 


=====================================
testsuite/tests/rts/T11223/T11223_link_order_a_b_2_fail.stderr-ws-64-mingw32
=====================================
@@ -20,6 +20,6 @@ archives or DLLs needed by your current session.  Restart GHCi, specifying
 the missing library using the -L/path/to/object/dir and -lmissinglibname
 flags, or simply by naming the relevant files on the GHCi command line.
 Alternatively, this link failure might indicate a bug in GHCi.
-If you suspect the latter, please send a bug report to:
-  glasgow-haskell-bugs at haskell.org
+If you suspect the latter, please report this as a GHC bug:
+  https://www.haskell.org/ghc/reportabug
 


=====================================
testsuite/tests/rts/T11223/T11223_simple_duplicate_lib.stderr
=====================================
@@ -20,6 +20,6 @@ archives or DLLs needed by your current session.  Restart GHCi, specifying
 the missing library using the -L/path/to/object/dir and -lmissinglibname
 flags, or simply by naming the relevant files on the GHCi command line.
 Alternatively, this link failure might indicate a bug in GHCi.
-If you suspect the latter, please send a bug report to:
-  glasgow-haskell-bugs at haskell.org
+If you suspect the latter, please report this as a GHC bug:
+  https://www.haskell.org/ghc/reportabug
 


=====================================
testsuite/tests/rts/T11223/T11223_simple_duplicate_lib.stderr-ws-32-mingw32
=====================================
@@ -20,6 +20,6 @@ archives or DLLs needed by your current session.  Restart GHCi, specifying
 the missing library using the -L/path/to/object/dir and -lmissinglibname
 flags, or simply by naming the relevant files on the GHCi command line.
 Alternatively, this link failure might indicate a bug in GHCi.
-If you suspect the latter, please send a bug report to:
-  glasgow-haskell-bugs at haskell.org
+If you suspect the latter, please report this as a GHC bug:
+  https://www.haskell.org/ghc/reportabug
 


=====================================
testsuite/tests/rts/T11223/T11223_simple_duplicate_lib.stderr-ws-64-mingw32
=====================================
@@ -20,6 +20,6 @@ archives or DLLs needed by your current session.  Restart GHCi, specifying
 the missing library using the -L/path/to/object/dir and -lmissinglibname
 flags, or simply by naming the relevant files on the GHCi command line.
 Alternatively, this link failure might indicate a bug in GHCi.
-If you suspect the latter, please send a bug report to:
-  glasgow-haskell-bugs at haskell.org
+If you suspect the latter, please report this as a GHC bug:
+  https://www.haskell.org/ghc/reportabug
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/a74a282a440c385c63395f32034c7b110422ce9e...93c42be48de8dddfbea15e8b0c682c6f567556dc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/a74a282a440c385c63395f32034c7b110422ce9e...93c42be48de8dddfbea15e8b0c682c6f567556dc
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190412/7589199d/attachment-0001.html>


More information about the ghc-commits mailing list