[commit: ghc] wip/circleci-ben: Squashed 'hadrian/' changes from 5ebb69ae1e..5baa8db601 (81b8b24)

git at git.haskell.org git at git.haskell.org
Sun Nov 12 00:06:51 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/circleci-ben
Link       : http://ghc.haskell.org/trac/ghc/changeset/81b8b24c15c0f983920b0152f0a076b7a8006bb1/ghc

>---------------------------------------------------------------

commit 81b8b24c15c0f983920b0152f0a076b7a8006bb1
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sat Nov 11 14:46:53 2017 -0500

    Squashed 'hadrian/' changes from 5ebb69ae1e..5baa8db601
    
    5baa8db601 Fix AppVeyor cache failure (#456)
    94dbe9d711 Fix ghc-cabal build (#455)
    a6797641ac Fix CI scripts (#454)
    06ec241ec6 Widen bounds on Cabal (#452)
    
    git-subtree-dir: hadrian
    git-subtree-split: 5baa8db6010021b03da6897b2442dacc4b4c07ff


>---------------------------------------------------------------

81b8b24c15c0f983920b0152f0a076b7a8006bb1
 .travis.yml                       |  4 +++-
 appveyor.yml                      | 24 +++++++++++++-----------
 cabal.project                     |  8 ++++++--
 circle.yml                        |  3 ++-
 hadrian.cabal                     |  2 +-
 src/Settings/Packages/GhcCabal.hs | 11 +++++++++--
 stack.yaml                        |  4 ++++
 7 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e2455b2..1943528 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -76,10 +76,12 @@ install:
     - cabal update
     - cabal install alex happy
 
+    # GHC comes with an older version of Hadrian, so we delete it
+    - rm -r ghc/hadrian/*
+
     # Travis has already cloned Hadrian into ./ and we need to move it
     # to ./ghc/hadrian -- one way to do it is to move the .git directory
     # and perform a hard reset in order to regenerate Hadrian files
-    - mkdir ghc/hadrian
     - mv .git ghc/hadrian
     - cd ghc/hadrian
     - git reset --hard HEAD
diff --git a/appveyor.yml b/appveyor.yml
index fbedf8f..bd871ca 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,4 +1,4 @@
-clone_folder: "c:\\ghc\\hadrian"
+clone_folder: "c:\\new-hadrian"
 environment:
   global:
     STACK_ROOT: "c:\\sr"
@@ -11,24 +11,26 @@ install:
     - curl -ostack.zip -LsS --insecure https://www.stackage.org/stack/windows-x86_64
     - 7z x stack.zip stack.exe
 
+    # Note: AppVeyor has already cloned Hadrian into c:\new-hadrian
     # Fetch GHC sources into c:\ghc
-    # Note: AppVeyor has already cloned Hadrian into c:\ghc\hadrian, so it's tricky
     - cd ..
-    - git init
-    - git remote add origin git://git.haskell.org/ghc.git
-    - git pull --recurse-submodules origin master
-    - git submodule update --init --recursive --quiet
+    - git clone --recursive git://git.haskell.org/ghc.git
+    # GHC comes with an older version of Hadrian, so we delete it
+    - rm -rf ghc\hadrian
+    # Copy new Hadrian into ./ghc/hadrian
+    - cp -r new-hadrian ghc\hadrian
+
+    # Install Alex and Happy
+    - set PATH=C:\Users\appveyor\AppData\Roaming\local\bin;%PATH%
+    - ghc\hadrian\stack install --install-ghc alex happy > nul
 
     # Install all Hadrian and GHC build dependencies
-    - cd hadrian
+    - cd ghc\hadrian
     - stack setup > nul
     - appveyor-retry stack exec -- pacman -S autoconf automake-wrapper make patch python tar --noconfirm
 
 build_script:
-    # Build Hadrian
-    - stack build alex happy # Otherwise 'build' fails on AppVeyor
-
-    # Run internal Hadrian tests
+    # Build Hadrian and run internal Hadrian tests
     - build selftest
 
     # Build GHC
diff --git a/cabal.project b/cabal.project
index 1ef81ca..317094f 100644
--- a/cabal.project
+++ b/cabal.project
@@ -1,2 +1,6 @@
-packages: ../libraries/Cabal/Cabal/
-          ./
+packages: ./
+          ../libraries/Cabal/Cabal/
+          ../libraries/filepath/
+          ../libraries/text/
+          ../libraries/hpc/
+          ../libraries/parsec/
diff --git a/circle.yml b/circle.yml
index a386d72..763475f 100644
--- a/circle.yml
+++ b/circle.yml
@@ -21,7 +21,8 @@ compile:
     - git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
     - git clone --depth 1 --recursive git://github.com/ghc/ghc
 
-    - mkdir ghc/hadrian
+    # GHC comes with an older version of Hadrian, so we delete it
+    - rm -r ghc/hadrian/*
     # move hadrian's .git into ./ghc/hadrian and perform a hard reset in order to regenerate Hadrian files
     - mv .git ghc/hadrian
     # NOTE: we must write them in the same line because each line
diff --git a/hadrian.cabal b/hadrian.cabal
index 566437e..389f553 100644
--- a/hadrian.cabal
+++ b/hadrian.cabal
@@ -118,7 +118,7 @@ executable hadrian
                        , TypeFamilies
     build-depends:       base >= 4.8 && < 5
                        , ansi-terminal        == 0.6.*
-                       , Cabal                == 2.0.0.2
+                       , Cabal                >= 2.0.0.2 && < 2.2
                        , containers           == 0.5.*
                        , directory            >= 1.2 && < 1.4
                        , extra                >= 1.4.7
diff --git a/src/Settings/Packages/GhcCabal.hs b/src/Settings/Packages/GhcCabal.hs
index 7d2e99e..0e915b3 100644
--- a/src/Settings/Packages/GhcCabal.hs
+++ b/src/Settings/Packages/GhcCabal.hs
@@ -11,14 +11,21 @@ ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do
     cabalDeps    <- expr $ stage1Dependencies cabal
     cabalVersion <- expr $ pkgVersion (unsafePkgCabalFile cabal) -- TODO: improve
     mconcat
-        [ pure [ "-package " ++ pkgName pkg | pkg <- cabalDeps, pkg /= parsec ]
+        [ pure [ "-package " ++ pkgName pkg | pkg <- cabalDeps \\ [parsec, mtl] ]
         , arg "--make"
         , arg "-j"
         , pure ["-Wall", "-fno-warn-unused-imports", "-fno-warn-warnings-deprecations"]
         , arg ("-DCABAL_VERSION=" ++ replace "." "," cabalVersion)
+        , arg "-DCABAL_PARSEC"
         , arg "-DBOOTSTRAPPING"
         , arg "-DMIN_VERSION_binary_0_8_0"
+        , arg "libraries/text/cbits/cbits.c"
         , arg "-ilibraries/Cabal/Cabal"
         , arg "-ilibraries/binary/src"
         , arg "-ilibraries/filepath"
-        , arg "-ilibraries/hpc" ]
+        , arg "-ilibraries/hpc"
+        , arg "-ilibraries/mtl"
+        , arg "-ilibraries/text"
+        , arg "-Ilibraries/text/include"
+        , arg "-ilibraries/parsec" ]
+
diff --git a/stack.yaml b/stack.yaml
index da03763..a1b7413 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -7,6 +7,10 @@ resolver: lts-9.0
 packages:
 - '.'
 - '../libraries/Cabal/Cabal'
+- '../libraries/filepath/'
+- '../libraries/text/'
+- '../libraries/hpc/'
+- '../libraries/parsec/'
 
 extra-deps:
 - shake-0.16



More information about the ghc-commits mailing list