[Git][ghc/ghc][wip/T23490-part2] 2 commits: Repair the 'build-cabal' hadrian target
Matthew Craven (@clyring)
gitlab at gitlab.haskell.org
Sat Jul 20 17:56:16 UTC 2024
Matthew Craven pushed to branch wip/T23490-part2 at Glasgow Haskell Compiler / GHC
Commits:
1cceba60 by Matthew Craven at 2024-07-20T13:54:53-04:00
Repair the 'build-cabal' hadrian target
Fixes #23117, fixes #23281, fixes #23490
- - - - -
4e1d5ab9 by Matthew Craven at 2024-07-20T13:55:34-04:00
Revert "CI: Disable the test-cabal-reinstall job"
This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255.
- - - - -
4 changed files:
- .gitlab-ci.yml
- cabal.project-reinstall
- compiler/Setup.hs
- compiler/ghc.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
@@ -52,10 +52,12 @@ primopIncls =
, ("primop-vector-tys-exports.hs-incl", "--primop-vector-tys-exports")
, ("primop-vector-tycons.hs-incl" , "--primop-vector-tycons")
, ("primop-docs.hs-incl" , "--wired-in-docs")
+ , ("primop-deprecations.hs-incl" , "--wired-in-deprecations")
]
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 +79,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.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e799f25e7dcb43948c60dede8ac9ba4b3ab5ab98...4e1d5ab9a397f05dc10dbce2469d67a4e857862f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e799f25e7dcb43948c60dede8ac9ba4b3ab5ab98...4e1d5ab9a397f05dc10dbce2469d67a4e857862f
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/20240720/e772e192/attachment-0001.html>
More information about the ghc-commits
mailing list