[Git][ghc/ghc][wip/T23490-part2] 2 commits: Repair the 'build-cabal' hadrian target

Matthew Craven (@clyring) gitlab at gitlab.haskell.org
Wed Jun 26 21:08:02 UTC 2024



Matthew Craven pushed to branch wip/T23490-part2 at Glasgow Haskell Compiler / GHC


Commits:
14e400ee by Matthew Craven at 2024-06-26T17:07:27-04:00
Repair the 'build-cabal' hadrian target

Fixes #23117, fixes #23281, fixes #23490

- - - - -
6e737395 by Matthew Craven at 2024-06-26T17:07:31-04:00
Revert "CI: Disable the test-cabal-reinstall job"

This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255.

- - - - -


5 changed files:

- .gitlab-ci.yml
- cabal.project-reinstall
- compiler/Setup.hs
- compiler/ghc.cabal.in
- libraries/ghc-boot/ghc-boot.cabal.in


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -489,21 +489,16 @@ stack-hadrian-build:
 # Testing reinstallable ghc codepath
 ####################################
 
-# As documented on the original ticket #19896, this feature already has a long
-# way to go before it can actually be used. Meanwhile, parts of it have
-# bit-rotted, possibly related to some Cabal change. The job is disabled for
-# now.
-#
-# test-cabal-reinstall-x86_64-linux-deb10:
-#   extends: nightly-x86_64-linux-deb10-validate
-#   stage: full-build
-#   variables:
-#     REINSTALL_GHC: "yes"
-#     BUILD_FLAVOUR: validate
-#     TEST_ENV: "x86_64-linux-deb10-cabal-install"
-#   rules:
-#     - if: $NIGHTLY
-#     - if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-reinstall.*/'
+test-cabal-reinstall-x86_64-linux-deb10:
+  extends: nightly-x86_64-linux-deb10-validate
+  stage: full-build
+  variables:
+    REINSTALL_GHC: "yes"
+    BUILD_FLAVOUR: validate
+    TEST_ENV: "x86_64-linux-deb10-cabal-install"
+  rules:
+    - if: $NIGHTLY
+    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-reinstall.*/'
 
 ########################################
 # Testing ABI is invariant across builds


=====================================
cabal.project-reinstall
=====================================
@@ -17,6 +17,7 @@ packages: ./compiler
            ./libraries/ghc-boot/
           -- ./libraries/ghc-boot-th/
           ./libraries/ghc-compact
+          ./libraries/ghc-experimental
           ./libraries/ghc-heap
           ./libraries/ghci
           -- ./libraries/ghc-prim
@@ -25,6 +26,7 @@ packages: ./compiler
           ./libraries/hpc
           -- ./libraries/integer-gmp
           ./libraries/mtl/
+          ./libraries/os-string/
           ./libraries/parsec/
           -- ./libraries/pretty/
           ./libraries/process/
@@ -39,6 +41,8 @@ packages: ./compiler
           ./libraries/Win32/
           ./libraries/xhtml/
           ./utils/ghc-pkg
+          ./utils/ghc-toolchain
+          ./utils/ghc-toolchain/exe
           ./utils/haddock
           ./utils/hp2ps
           ./utils/hpc
@@ -61,15 +65,10 @@ constraints: ghc +internal-interpreter +dynamic-system-linke,
              any.pretty installed,
              any.template-haskell installed
 
-allow-newer:
-  ghc-paths:Cabal,
-  *:base,
-  *:ghc-prim,
-  tree-diff:time
 
 benchmarks: False
 tests: False
-allow-boot-library-installs: False
+allow-boot-library-installs: True
 
 -- Workaround for https://github.com/haskell/cabal/issues/7297
 package *


=====================================
compiler/Setup.hs
=====================================
@@ -1,4 +1,4 @@
-{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE NamedFieldPuns #-}
 module Main where
 
 import Distribution.Simple
@@ -55,7 +55,8 @@ primopIncls =
     ]
 
 ghcAutogen :: Verbosity -> LocalBuildInfo -> IO ()
-ghcAutogen verbosity lbi at LocalBuildInfo{..} = do
+ghcAutogen verbosity lbi at LocalBuildInfo{pkgDescrFile,withPrograms,componentNameMap}
+  = do
   -- Get compiler/ root directory from the cabal file
   let Just compilerRoot = takeDirectory <$> pkgDescrFile
 
@@ -77,7 +78,7 @@ ghcAutogen verbosity lbi at LocalBuildInfo{..} = do
   -- Call genprimopcode to generate *.hs-incl
   forM_ primopIncls $ \(file,command) -> do
     contents <- readProcess "genprimopcode" [command] primopsStr
-    rewriteFileEx verbosity (buildDir </> file) contents
+    rewriteFileEx verbosity (buildDir lbi </> file) contents
 
   -- Write GHC.Platform.Constants
   let platformConstantsPath = autogenPackageModulesDir lbi </> "GHC/Platform/Constants.hs"


=====================================
compiler/ghc.cabal.in
=====================================
@@ -50,7 +50,7 @@ extra-source-files:
 
 
 custom-setup
-    setup-depends: base >= 3 && < 5, Cabal >= 1.6 && <3.10, directory, process, filepath, containers
+    setup-depends: base >= 3 && < 5, Cabal >= 1.6 && <3.14, directory, process, filepath, containers
 
 Flag internal-interpreter
     Description: Build with internal interpreter support.


=====================================
libraries/ghc-boot/ghc-boot.cabal.in
=====================================
@@ -28,7 +28,7 @@ build-type:     Custom
 extra-source-files: changelog.md
 
 custom-setup
-    setup-depends: base >= 3 && < 5, Cabal >= 1.6 && <3.10, directory, filepath
+    setup-depends: base >= 3 && < 5, Cabal >= 1.6 && <3.14, directory, filepath
 
 source-repository head
     type:     git



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b2769a4a06148bd692883cc89d6d2beb9fc8e9c0...6e7373951a18b2e74d9768572a9d2d81df692998

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b2769a4a06148bd692883cc89d6d2beb9fc8e9c0...6e7373951a18b2e74d9768572a9d2d81df692998
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/20240626/6e137d74/attachment-0001.html>


More information about the ghc-commits mailing list