[Git][ghc/ghc][master] 2 commits: hadrian/hie-bios: pass -j to hadrian

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Feb 26 20:19:15 UTC 2024



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


Commits:
c71bfdff by Cheng Shao at 2024-02-26T15:18:35-05:00
hadrian/hie-bios: pass -j to hadrian

This commit passes -j to hadrian in the hadrian/hie-bios scripts. When
the user starts HLS in a fresh clone that has just been configured, it
takes quite a while for hie-bios to pick up the ghc flags and start
actual indexing, due to the fact that the hadrian build step defaulted
to -j1, so -j speeds things up and improve HLS user experience in GHC.
Also add -j flag to .ghcid to speed up ghcid, and sets the Windows
build root to .hie-bios which also works and unifies with other
platforms, the previous build root _hie-bios was missing from
.gitignore anyway.

- - - - -
50bfdb46 by Cheng Shao at 2024-02-26T15:18:35-05:00
ci: enable parallelism in hadrian/ghci scripts

This commit enables parallelism when the hadrian/ghci scripts are
called in CI. The time bottleneck is in the hadrian build step, but
previously the build step wasn't parallelized.

- - - - -


4 changed files:

- .ghcid
- .gitlab-ci.yml
- hadrian/hie-bios
- hadrian/hie-bios.bat


Changes:

=====================================
.ghcid
=====================================
@@ -1,4 +1,4 @@
---command sh ./hadrian/ghci
+--command sh -c "HADRIAN_ARGS=-j ./hadrian/ghci -j"
 --reload compiler
 --reload ghc
 --reload includes


=====================================
.gitlab-ci.yml
=====================================
@@ -402,7 +402,8 @@ hadrian-ghc-in-ghci:
     - "echo 'package hadrian'  > hadrian/cabal.project.local"
     - "echo '  ghc-options: -Werror'  >> hadrian/cabal.project.local"
     # Load ghc-in-ghci then immediately exit and check the modules loaded
-    - echo ":q" | hadrian/ghci -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
+    - export CORES="$(mk/detect-cpu-count.sh)"
+    - echo ":q" | HADRIAN_ARGS=-j$CORES hadrian/ghci -j$CORES | tail -n2 | grep "Ok,"
   after_script:
     - .gitlab/ci.sh save_cache
     - cat ci-timings
@@ -453,8 +454,9 @@ hadrian-multi:
     - .gitlab/ci.sh configure
     # Now GHC means, use this GHC for hadrian
     - export GHC=$BOOT_HC
+    - export CORES="$(mk/detect-cpu-count.sh)"
     # 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,"
+    - echo ":q" | HADRIAN_ARGS=-j$CORES hadrian/ghci-multi -j$CORES | tail -n2 | grep "Ok,"
   after_script:
     - .gitlab/ci.sh save_cache
   cache:


=====================================
hadrian/hie-bios
=====================================
@@ -3,5 +3,4 @@
 # When run, this program will output a list of arguments which are necessary to
 # load the GHC library component into GHCi. The program is used by `ghcide` in
 # order to automatically set up the correct GHC API session for a project.
-TERM=dumb CABFLAGS=-v0 TOOL_OUTPUT=$HIE_BIOS_OUTPUT $PWD/hadrian/build-cabal tool:$1 -q --build-root=.hie-bios --flavour=ghc-in-ghci
-
+TERM=dumb CABFLAGS=-v0 TOOL_OUTPUT=$HIE_BIOS_OUTPUT $PWD/hadrian/build-cabal tool:$1 -q --build-root=.hie-bios --flavour=ghc-in-ghci -j


=====================================
hadrian/hie-bios.bat
=====================================
@@ -1,4 +1,4 @@
 set TERM=dumb
 set CABFLAGS=-v0
 set TOOL_OUTPUT=%HIE_BIOS_OUTPUT%
-%CD%\hadrian\build-cabal.bat tool:%1 --build-root=_hie-bios --flavour=ghc-in-ghci
+%CD%\hadrian\build-cabal.bat tool:%1 --build-root=.hie-bios --flavour=ghc-in-ghci -j



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3de8a3c6f25b2c7eeb2ec6da95be24eeb496914...50bfdb46962ca377bb1b9fffd91ed78288590a17

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3de8a3c6f25b2c7eeb2ec6da95be24eeb496914...50bfdb46962ca377bb1b9fffd91ed78288590a17
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/20240226/fd5258d9/attachment-0001.html>


More information about the ghc-commits mailing list