[Git][ghc/ghc][wip/bump-win32] 7 commits: gitlab-ci: Bump Docker images

Ben Gamari gitlab at gitlab.haskell.org
Thu Sep 10 05:31:56 UTC 2020



Ben Gamari pushed to branch wip/bump-win32 at Glasgow Haskell Compiler / GHC


Commits:
5aae5b32 by Ben Gamari at 2020-09-09T18:31:40-04:00
gitlab-ci: Bump Docker images

We now generate our Docker images via Dhall definitions, as described in
ghc/ci-images!52. Additionally, we are far more careful about where tools
come from, using the ALEX, HAPPY, HSCOLOR, and GHC environment variables
(set in the Dockerfiles) to find bootstrapping tools.

- - - - -
4ce9fe88 by Ben Gamari at 2020-09-09T18:31:40-04:00
hadrian: Fix leakage of GHC in PATH into build

Previously hadrian would use GHC on PATH when configuring packages (or
fail if there is no such GHC). Fix this. Unfortunately this runs into
another bug in Cabal which we workaround.

- - - - -
291a15dd by Ben Gamari at 2020-09-09T18:31:40-04:00
utils: Bump cabal-version of hp2ps and unlit

- - - - -
4798caa0 by David Himmelstrup at 2020-09-09T18:32:16-04:00
rts comment: RTS_TICKY_SYMBOLS moved from rts/Linker.c to rts/RtsSymbols.c

- - - - -
a3f4dc1a by Ben Gamari at 2020-09-10T01:31:44-04:00
rts/win32: Fix missing #include's

These slipped through CI.

- - - - -
b197e57d by Ben Gamari at 2020-09-10T01:31:44-04:00
Bump Win32 submodule to 2.9.0.0

Also bumps Cabal, directory

- - - - -
b62eed7a by Ben Gamari at 2020-09-10T01:31:44-04:00
Bump version to 9.0

(cherry picked from commit f218cfc92f7b1a1e01190851972bb9a0e0f3c682)

- - - - -


21 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- compiler/ghc.cabal.in
- configure.ac
- ghc/ghc-bin.cabal.in
- hadrian/build-cabal
- hadrian/build-cabal.bat
- hadrian/src/Hadrian/Oracles/Cabal/Rules.hs
- includes/stg/Ticky.h
- libraries/Cabal
- libraries/directory
- libraries/haskeline
- rts/win32/IOManager.c
- rts/win32/WorkQueue.c
- testsuite/tests/module/mod184.stderr
- utils/check-api-annotations/check-api-annotations.cabal
- utils/check-ppr/check-ppr.cabal
- utils/ghc-cabal/ghc-cabal.cabal
- utils/haddock
- utils/hp2ps/hp2ps.cabal
- utils/unlit/unlit.cabal


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: b65e1145d7c0a62c3533904a88dac14f56fb371b
+  DOCKER_REV: e1cdfaea745989faa266f09c1d6c4c981aa34dc6
 
   # Sequential version number capturing the versions of all tools fetched by
   # .gitlab/ci.sh.
@@ -119,7 +119,7 @@ lint-testsuite:
   stage: lint
   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
   script:
-    - make -Ctestsuite list_broken TEST_HC=ghc
+    - make -Ctestsuite list_broken TEST_HC=$GHC
   dependencies: []
   tags:
     - lint
@@ -259,7 +259,7 @@ hadrian-ghc-in-ghci:
     - x86_64-linux
   script:
     - cabal update
-    - cd hadrian; cabal new-build --project-file=ci.project; cd ..
+    - cd hadrian; cabal new-build --with-compiler=$GHC --project-file=ci.project; cd ..
     - git clean -xdf && git submodule foreach git clean -xdf
     - .gitlab/ci.sh setup
     - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
@@ -461,66 +461,66 @@ validate-x86_64-darwin:
       - toolchain
 
 #################################
-# aarch64-linux-deb9
+# aarch64-linux-deb10
 #################################
 
-.build-aarch64-linux-deb9:
+.build-aarch64-linux-deb10:
   extends: .validate-linux
   stage: full-build
-  image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb9:$DOCKER_REV"
+  image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV"
   allow_failure: true
   variables:
-    TEST_ENV: "aarch64-linux-deb9"
-    BIN_DIST_PREP_TAR_COMP: "ghc-aarch64-linux-deb9.tar.xz"
+    TEST_ENV: "aarch64-linux-deb10"
+    BIN_DIST_PREP_TAR_COMP: "ghc-aarch64-linux-deb10.tar.xz"
   cache:
-    key: linux-aarch64-deb9
+    key: linux-aarch64-deb10
   tags:
     - aarch64-linux
 
-validate-aarch64-linux-deb9:
-  extends: .build-aarch64-linux-deb9
+validate-aarch64-linux-deb10:
+  extends: .build-aarch64-linux-deb10
   artifacts:
     when: always
     expire_in: 2 week
 
-nightly-aarch64-linux-deb9:
+nightly-aarch64-linux-deb10:
   <<: *nightly
-  extends: .build-aarch64-linux-deb9
+  extends: .build-aarch64-linux-deb10
   variables:
     TEST_TYPE: slowtest
 
 #################################
-# armv7-linux-deb9
+# armv7-linux-deb10
 #################################
 
-.build-armv7-linux-deb9:
+.build-armv7-linux-deb10:
   extends: .validate-linux
   stage: full-build
-  image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb9:$DOCKER_REV"
+  image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV"
   # Due to linker issues
   allow_failure: true
   variables:
-    TEST_ENV: "armv7-linux-deb9"
-    BIN_DIST_PREP_TAR_COMP: "ghc-armv7-linux-deb9.tar.xz"
+    TEST_ENV: "armv7-linux-deb10"
+    BIN_DIST_PREP_TAR_COMP: "ghc-armv7-linux-deb10.tar.xz"
     CONFIGURE_ARGS: "--host=armv7-linux-gnueabihf --build=armv7-linux-gnueabihf --target=armv7-linux-gnueabihf"
     # N.B. We disable ld.lld explicitly here because it appears to fail
     # non-deterministically on ARMv7. See #18280.
     LD: "ld.gold"
     GccUseLdOpt: "-fuse-ld=gold"
   cache:
-    key: linux-armv7-deb9
+    key: linux-armv7-deb10
   tags:
     - armv7-linux
 
-validate-armv7-linux-deb9:
-  extends: .build-armv7-linux-deb9
+validate-armv7-linux-deb10:
+  extends: .build-armv7-linux-deb10
   artifacts:
     when: always
     expire_in: 2 week
 
-nightly-armv7-linux-deb9:
+nightly-armv7-linux-deb10:
   <<: *nightly
-  extends: .build-armv7-linux-deb9
+  extends: .build-armv7-linux-deb10
   variables:
     TEST_TYPE: slowtest
 
@@ -734,7 +734,7 @@ release-x86_64-linux-deb8:
 .build-x86_64-linux-alpine-hadrian:
   extends: .validate-linux-hadrian
   stage: full-build
-  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine:$DOCKER_REV"
+  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV"
   # There are currently a few failing tests
   allow_failure: true
   variables:
@@ -1082,8 +1082,8 @@ perf-nofib:
       make install
       popd
       rm -Rf tmp
-    - export BOOT_HC=$(which ghc)
-    - cabal update; cabal install -w $BOOT_HC regex-compat
+    - export BOOT_HC=$GHC
+    - cabal update; cabal install -w "$BOOT_HC" --lib regex-compat
     - export PATH=$root/bin:$PATH
     - make -C nofib boot mode=fast -j$CPUS
     - "make -C nofib EXTRA_RUNTEST_OPTS='-cachegrind +RTS -V0 -RTS' NoFibRuns=1 mode=fast -j$CPUS 2>&1 | tee nofib.log"


=====================================
.gitlab/ci.sh
=====================================
@@ -152,22 +152,26 @@ function show_tool() {
 function set_toolchain_paths() {
   needs_toolchain=1
   case "$(uname)" in
-    Linux) needs_toolchain="" ;;
+    Linux) needs_toolchain="0" ;;
     *) ;;
   esac
 
-  if [[ -n "$needs_toolchain" ]]; then
+  if [[ "$needs_toolchain" = 1 ]]; then
       # These are populated by setup_toolchain
       GHC="$toolchain/bin/ghc$exe"
       CABAL="$toolchain/bin/cabal$exe"
       HAPPY="$toolchain/bin/happy$exe"
       ALEX="$toolchain/bin/alex$exe"
   else
-      GHC="$(which ghc)"
-      CABAL="/usr/local/bin/cabal"
-      HAPPY="$HOME/.cabal/bin/happy"
-      ALEX="$HOME/.cabal/bin/alex"
+      # These are generally set by the Docker image but
+      # we provide these handy fallbacks in case the
+      # script isn't run from within a GHC CI docker image.
+      if [ -z "$GHC" ]; then GHC="$(which ghc)"; fi
+      if [ -z "$CABAL" ]; then GHC="$(which cabal)"; fi
+      if [ -z "$HAPPY" ]; then GHC="$(which happy)"; fi
+      if [ -z "$ALEX" ]; then GHC="$(which alex)"; fi
   fi
+
   export GHC
   export CABAL
   export HAPPY
@@ -204,12 +208,12 @@ function setup() {
 }
 
 function fetch_ghc() {
-  local v="$GHC_VERSION"
-  if [[ -z "$v" ]]; then
-      fail "GHC_VERSION is not set"
-  fi
-
   if [ ! -e "$GHC" ]; then
+      local v="$GHC_VERSION"
+      if [[ -z "$v" ]]; then
+          fail "neither GHC nor GHC_VERSION are not set"
+      fi
+
       start_section "fetch GHC"
       url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz"
       info "Fetching GHC binary distribution from $url..."
@@ -233,12 +237,12 @@ function fetch_ghc() {
 }
 
 function fetch_cabal() {
-  local v="$CABAL_INSTALL_VERSION"
-  if [[ -z "$v" ]]; then
-      fail "CABAL_INSTALL_VERSION is not set"
-  fi
-
   if [ ! -e "$CABAL" ]; then
+      local v="$CABAL_INSTALL_VERSION"
+      if [[ -z "$v" ]]; then
+          fail "neither CABAL nor CABAL_INSTALL_VERSION are not set"
+      fi
+
       start_section "fetch GHC"
       case "$(uname)" in
         # N.B. Windows uses zip whereas all others use .tar.xz
@@ -279,7 +283,11 @@ function fetch_cabal() {
 function setup_toolchain() {
   fetch_ghc
   fetch_cabal
-  cabal_install="$CABAL v2-install --index-state=$hackage_index_state --installdir=$toolchain/bin"
+
+  cabal_install="$CABAL v2-install \
+    --with-compiler=$GHC \
+    --index-state=$hackage_index_state --installdir=$toolchain/bin"
+
   # Avoid symlinks on Windows
   case "$(uname)" in
     MSYS_*|MINGW*) cabal_install="$cabal_install --install-method=copy" ;;


=====================================
compiler/ghc.cabal.in
=====================================
@@ -77,7 +77,7 @@ Library
                    ghci == @ProjectVersionMunged@
 
     if os(windows)
-        Build-Depends: Win32  >= 2.3 && < 2.7
+        Build-Depends: Win32  >= 2.3 && < 2.10
     else
         if flag(terminfo)
             Build-Depends: terminfo == 0.4.*


=====================================
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.11.0], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.0.0], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
 
 # Set this to YES for a released version, otherwise NO
 : ${RELEASE=NO}


=====================================
ghc/ghc-bin.cabal.in
=====================================
@@ -45,7 +45,7 @@ Executable ghc
                    ghc        == @ProjectVersionMunged@
 
     if os(windows)
-        Build-Depends: Win32  >= 2.3 && < 2.7
+        Build-Depends: Win32  >= 2.3 && < 2.10
     else
         Build-Depends: unix   >= 2.7 && < 2.9
 
@@ -102,4 +102,4 @@ Executable ghc
     Default-Extensions:
         NoImplicitPrelude
       , ScopedTypeVariables
-      , BangPatterns
\ No newline at end of file
+      , BangPatterns


=====================================
hadrian/build-cabal
=====================================
@@ -1,8 +1,9 @@
 #!/usr/bin/env bash
 
-CABAL=cabal
-CABFLAGS=("--disable-documentation" "--disable-profiling" "--disable-library-profiling" $CABFLAGS)
-( ${GHC:-ghc} --info | grep -s '("Support SMP","YES")' > /dev/null ) || CABFLAGS+=("--constraint=hadrian -threaded")
+CABAL="${CABAL:-cabal}"
+GHC="${GHC:-ghc}"
+CABFLAGS=("--with-compiler=$GHC" "--disable-documentation" "--disable-profiling" "--disable-library-profiling" $CABFLAGS)
+( $GHC --info | grep -s '("Support SMP","YES")' > /dev/null ) || CABFLAGS+=("--constraint=hadrian -threaded")
 
 # It is currently more robust to pass Cabal an absolute path to the project file.
 PROJ="$PWD/hadrian/cabal.project"


=====================================
hadrian/build-cabal.bat
=====================================
@@ -4,8 +4,12 @@ if "%CABAL%"=="" (
     set CABAL=cabal
 )
 
+if "%GHC%"=="" (
+    set GHC=ghc
+)
+
 if "%CABFLAGS%"=="" (
-    set CABFLAGS=--disable-documentation --disable-profiling --disable-library-profiling
+    set CABFLAGS=--with-compiler=%GHC% --disable-documentation --disable-profiling --disable-library-profiling
 )
 
 rem It is currently more robust to pass Cabal an absolute path to the project file.


=====================================
hadrian/src/Hadrian/Oracles/Cabal/Rules.hs
=====================================
@@ -15,6 +15,7 @@ import Control.Monad
 import Data.Maybe
 import Development.Shake
 import Distribution.Simple.GHC
+import Distribution.Simple.Program.Builtin
 import Distribution.Simple.Program.Db
 import Distribution.Verbosity
 
@@ -58,8 +59,13 @@ cabalOracle = do
                ++ quote (pkgName pkg) ++ " (" ++ show stage ++ ")..."
         -- Configure the package with the GHC corresponding to the given stage
         hcPath <- builderPath (Ghc CompileHs stage)
+        let progDb = userSpecifyPath "ghc" hcPath
+                     $ addKnownProgram ghcProgram emptyProgramDb
         (compiler, maybePlatform, _pkgdb) <- liftIO $
-            configure silent (Just hcPath) Nothing emptyProgramDb
+            -- N.B. the hcPath parameter of `configure` is broken when given an
+            -- empty ProgramDb. To work around this we manually construct an
+            -- appropriate ProgramDb.
+            configure silent Nothing Nothing progDb
         let platform = fromMaybe (error msg) maybePlatform
             msg      = "PackageConfiguration oracle: cannot detect platform"
         return $ PackageConfiguration (compiler, platform)


=====================================
includes/stg/Ticky.h
=====================================
@@ -19,7 +19,7 @@
 
 /* Here are all the counter declarations: */
 /* If you change this list, make the corresponding change
-   in RTS_TICKY_SYMBOLS in rts/Linker.c  */
+   in RTS_TICKY_SYMBOLS in rts/RtsSymbols.c  */
 
 /* These two are explicitly declared in rts/Ticky.c, and
    hence should not be extern'd except when using this header


=====================================
libraries/Cabal
=====================================
@@ -1 +1 @@
-Subproject commit 32dad5c1cf70d65ecb93b0ec214445cf9c9f6615
+Subproject commit 2d8a1b60ae409291585b647be8f02bc42b23cbbb


=====================================
libraries/directory
=====================================
@@ -1 +1 @@
-Subproject commit 3d9ca6edc0703860829ab3210db78bb4c4ff72b9
+Subproject commit c16afcda5708ee9944afa7ea6858e5be894fe67e


=====================================
libraries/haskeline
=====================================
@@ -1 +1 @@
-Subproject commit 5f16b76168f13c6413413386efc44fb1152048d5
+Subproject commit 1b4f19ef56adc86a860884363d3dcb19bc09d01b


=====================================
rts/win32/IOManager.c
=====================================
@@ -11,6 +11,7 @@
 #if !defined(THREADED_RTS)
 
 #include "Rts.h"
+#include "RtsUtils.h"
 #include "IOManager.h"
 #include "WorkQueue.h"
 #include "ConsoleHandler.h"
@@ -440,7 +441,7 @@ AddIORequest ( int   fd,
 {
     ASSERT(ioMan);
 
-    WorkItem* wItem    = (WorkItem*)stgMallocBytse(sizeof(WorkItem), "AddIORequest");
+    WorkItem* wItem    = (WorkItem*)stgMallocBytes(sizeof(WorkItem), "AddIORequest");
 
     unsigned int reqID = ioMan->requestID++;
 


=====================================
rts/win32/WorkQueue.c
=====================================
@@ -4,6 +4,7 @@
  * (c) sof, 2002-2003.
  */
 #include "Rts.h"
+#include "RtsUtils.h"
 #include "WorkQueue.h"
 #include <stdbool.h>
 #include <stdio.h>


=====================================
testsuite/tests/module/mod184.stderr
=====================================
@@ -1,3 +1,4 @@
+
 mod184.hs:6:8: warning: [-Wprepositive-qualified-module]
     Found ‘qualified’ in prepositive position
     Suggested fix: place  ‘qualified’ after the module name instead.


=====================================
utils/check-api-annotations/check-api-annotations.cabal
=====================================
@@ -24,6 +24,6 @@ Executable check-api-annotations
 
     Build-Depends: base       >= 4   && < 5,
                    containers,
-                   Cabal      >= 3.0 && < 3.4,
+                   Cabal      >= 3.0 && < 3.6,
                    directory,
                    ghc


=====================================
utils/check-ppr/check-ppr.cabal
=====================================
@@ -25,7 +25,7 @@ Executable check-ppr
     Build-Depends: base       >= 4   && < 5,
                    bytestring,
                    containers,
-                   Cabal      >= 3.0 && < 3.4,
+                   Cabal      >= 3.0 && < 3.6,
                    directory,
                    filepath,
                    ghc


=====================================
utils/ghc-cabal/ghc-cabal.cabal
=====================================
@@ -21,6 +21,6 @@ Executable ghc-cabal
 
     Build-Depends: base       >= 3   && < 5,
                    bytestring >= 0.10 && < 0.11,
-                   Cabal      >= 3.0 && < 3.4,
+                   Cabal      >= 3.0 && < 3.6,
                    directory  >= 1.1 && < 1.4,
                    filepath   >= 1.2 && < 1.5


=====================================
utils/haddock
=====================================
@@ -1 +1 @@
-Subproject commit e514a52a496d1ec216568deec374872b4b5251a6
+Subproject commit b95f6f29899a8a58223732a6633a47a35b8f1d6a


=====================================
utils/hp2ps/hp2ps.cabal
=====================================
@@ -1,4 +1,4 @@
-cabal-version: 2.1
+cabal-version: 2.4
 Name: hp2ps
 Version: 0.1
 Copyright: XXX


=====================================
utils/unlit/unlit.cabal
=====================================
@@ -1,4 +1,4 @@
-cabal-version: 2.1
+cabal-version: 2.4
 Name: unlit
 Version: 0.1
 Copyright: XXX



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8ae323deae5b08bbce156cbbd106596affe05d65...b62eed7adfa0022f746afb375d53d918a38e6fde

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8ae323deae5b08bbce156cbbd106596affe05d65...b62eed7adfa0022f746afb375d53d918a38e6fde
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/20200910/1cd8c312/attachment-0001.html>


More information about the ghc-commits mailing list