[Git][ghc/ghc][master] 5 commits: Update containers submodule

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sat Dec 10 01:16:05 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
65335d10 by Matthew Pickering at 2022-12-09T20:15:45-05:00
Update containers submodule

This contains a fix necessary for the multi-repl to work on GHC's code
base where we try to load containers and template-haskell into the same
session.

- - - - -
4937c0bb by Matthew Pickering at 2022-12-09T20:15:45-05:00
hadrian-multi: Put interface files in separate directories

Before we were putting all the interface files in the same directory
which was leading to collisions if the files were called the same thing.

- - - - -
8acb5b7b by Matthew Pickering at 2022-12-09T20:15:45-05:00
hadrian-toolargs: Add filepath to allowed repl targets

- - - - -
5949d927 by Matthew Pickering at 2022-12-09T20:15:45-05:00
driver: Set correct UnitId when rehydrating modules

We were not setting the UnitId before rehydrating modules which just led
to us attempting to find things in the wrong HPT. The test for this is
the hadrian-multi command (which is now added as a CI job).

Fixes #22222

- - - - -
ab06c0f0 by Matthew Pickering at 2022-12-09T20:15:45-05:00
ci: Add job to test hadrian-multi command

I am not sure this job is good because it requires booting HEAD with
HEAD, but it should be fine.

- - - - -


6 changed files:

- .gitlab-ci.yml
- compiler/GHC/Driver/Make.hs
- configure.ac
- hadrian/ghci-multi-cabal.in
- hadrian/src/Rules/ToolArgs.hs
- libraries/containers


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -376,6 +376,57 @@ hadrian-ghc-in-ghci:
     paths:
       - cabal-cache
 
+############################################################
+# Hadrian Multi-Repl
+############################################################
+
+hadrian-multi:
+  stage: testing
+  needs:
+    - job: x86_64-linux-fedora33-release
+      optional: true
+    - job: nightly-x86_64-linux-fedora33-release
+      optional: true
+    - job: release-x86_64-linux-fedora33-release
+      optional: true
+  dependencies: null
+  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
+  before_script:
+    # workaround for docker permissions
+    - sudo chown ghc:ghc -R .
+  variables:
+    GHC_FLAGS: -Werror
+    CONFIGURE_ARGS: --enable-bootstrap-with-devel-snapshot
+  tags:
+    - x86_64-linux
+  script:
+    - export BOOT_HC=$GHC
+    - root=$(pwd)/ghc
+    - ls
+    - |
+      mkdir tmp
+      tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C tmp
+      pushd tmp/ghc-*/
+      ./configure --prefix=$root
+      make install
+      popd
+      rm -Rf tmp
+    - export HC=$root/bin/ghc
+    # This GHC means, use this GHC to configure with
+    - export GHC=$root/bin/ghc
+    - .gitlab/ci.sh setup
+    - .gitlab/ci.sh configure
+    # Now GHC means, use this GHC for hadrian
+    - export GHC=$BOOT_HC
+    # Load hadrian-multi then immediately exit and check the modules loaded
+    - echo ":q" | hadrian/ghci-multi -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
+  after_script:
+    - .gitlab/ci.sh save_cache
+  cache:
+    key: hadrian-ghci-$CACHE_REV
+    paths:
+      - cabal-cache
+
 ############################################################
 # stack-hadrian-build
 ############################################################


=====================================
compiler/GHC/Driver/Make.hs
=====================================
@@ -1161,9 +1161,10 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do
       hug_var <- gets hug_var
       !build_map <- getBuildMap
       res_var <- liftIO newEmptyMVar
-      let
+      let loop_unit :: UnitId
+          !loop_unit = nodeKeyUnitId (gwib_mod (head deps))
           !build_deps = getDependencies (map gwib_mod deps) build_map
-      let loop_action = do
+      let loop_action = withCurrentUnit loop_unit $ do
             (hug, tdeps) <- wait_deps_hug hug_var build_deps
             hsc_env <- asks hsc_env
             let new_hsc = setHUG hug hsc_env


=====================================
configure.ac
=====================================
@@ -1201,6 +1201,7 @@ AC_CONFIG_FILES(
 [ mk/project.mk
   hadrian/cfg/system.config
   hadrian/ghci-cabal
+  hadrian/ghci-multi-cabal
   hadrian/ghci-stack
   docs/users_guide/ghc_config.py
   distrib/configure.ac


=====================================
hadrian/ghci-multi-cabal.in
=====================================
@@ -1,7 +1,7 @@
 #!/usr/bin/env sh
 
-GHC=@WithGhc@
-if [[ $(printf "9.4.0\n%s\n" $($GHC --numeric-version) | sort -uV | head -n 1) != "9.4.0" ]]; then echo "Multi-repl needs at least GHC-9.4.1"; exit 1; fi
+RUN_GHC=@WithGhc@
+if [[ $(printf "9.4.0\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.4.0" ]]; then echo "Multi-repl needs at least GHC-9.4.1"; exit 1; fi
 
 # This file is generated by configure from ghci-multi.in
 
@@ -10,4 +10,4 @@ export TOOL_OUTPUT=.hadrian_ghci_multi/ghci_args
 # Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
 CABFLAGS=-v0 "hadrian/build-cabal" multi:ghc --build-root=.hadrian_ghci_multi --flavour=ghc-in-ghci $HADRIAN_ARGS
 GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')"
-$GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -hidir=.hadrian_ghci_multi/interface -O0 +RTS -A128m
+$RUN_GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -O0 +RTS -A128m


=====================================
hadrian/src/Rules/ToolArgs.hs
=====================================
@@ -84,9 +84,11 @@ multiSetup pkg_s = do
       gens <- interpretInContext c generatedDependencies
       need (srcs ++ gens)
       let rexp m = ["-reexported-module", m]
+      let hidir = root </> "interfaces" </> pkgPath p
       writeFile' (resp_file root p) (intercalate "\n" (th_hack arg_list
                                                       ++  modules cd
-                                                      ++ concatMap rexp (reexportModules cd) ))
+                                                      ++ concatMap rexp (reexportModules cd)
+                                                      ++ ["-outputdir", hidir]))
       return (resp_file root p)
 
 
@@ -151,6 +153,7 @@ toolTargets = [ binary
               , directory
               , process
               , exceptions
+              , filepath
               -- , ghc     -- # depends on ghc library
               -- , runGhc  -- # depends on ghc library
               , ghcBoot


=====================================
libraries/containers
=====================================
@@ -1 +1 @@
-Subproject commit 5e338df84454b56d649360a57d2c186785aff2b4
+Subproject commit fbafcf704f0febd9ddac84dbe00ae3787af43550



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5b007ec52ba77051fedd2b9a6fb155b248081511...ab06c0f0ccaeb3277195e4eeac541c00558d4cc2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5b007ec52ba77051fedd2b9a6fb155b248081511...ab06c0f0ccaeb3277195e4eeac541c00558d4cc2
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/20221209/3698d7b9/attachment-0001.html>


More information about the ghc-commits mailing list