[Git][ghc/ghc][master] 4 commits: Remove extraneous debug output

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Jun 28 16:26:17 UTC 2023



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


Commits:
bf9ec3e4 by Bryan Richter at 2023-06-28T12:25:33-04:00
Remove extraneous debug output

- - - - -
7eb68dd6 by Bryan Richter at 2023-06-28T12:25:33-04:00
Work with unset vars in -e mode

- - - - -
49c27936 by Bryan Richter at 2023-06-28T12:25:33-04:00
Pass positional arguments in their positions

By quoting $cmd, the default "bash -i" is a single argument to run, and
no file named "bash -i" actually exists to be run.

- - - - -
887dc4fc by Bryan Richter at 2023-06-28T12:25:33-04:00
Handle unset value in -e context

- - - - -


2 changed files:

- .gitlab/ci.sh
- .gitlab/darwin/toolchain.nix


Changes:

=====================================
.gitlab/ci.sh
=====================================
@@ -211,7 +211,6 @@ function set_toolchain_paths() {
         esac
         info "Building toolchain for $NIX_SYSTEM"
         nix-build --quiet .gitlab/darwin/toolchain.nix --argstr system "$NIX_SYSTEM" -o toolchain.sh
-        cat toolchain.sh
       fi
       source toolchain.sh
       ;;
@@ -219,10 +218,10 @@ function set_toolchain_paths() {
       # These are generally set by the Docker image but
       # we provide these handy fallbacks in case the
       # script isn't run from within a GHC CI docker image.
-      if [ -z "$GHC" ]; then GHC="$(which ghc)"; fi
-      if [ -z "$CABAL" ]; then CABAL="$(which cabal)"; fi
-      if [ -z "$HAPPY" ]; then HAPPY="$(which happy)"; fi
-      if [ -z "$ALEX" ]; then ALEX="$(which alex)"; fi
+      : ${GHC:=$(which ghc)}
+      : ${CABAL:=$(which cabal)}
+      : ${HAPPY:=$(which happy)}
+      : ${ALEX:=$(which alex)}
       ;;
     *) fail "bad toolchain_source"
   esac
@@ -806,7 +805,7 @@ function shell() {
   if [ -z "$cmd" ]; then
     cmd="bash -i"
   fi
-  run "$cmd"
+  run $cmd
 }
 
 function lint_author(){
@@ -915,8 +914,8 @@ determine_metric_baseline
 
 set_toolchain_paths
 
-case $1 in
-  usage) usage ;;
+case ${1:-help} in
+  help|usage) usage ;;
   setup) setup && cleanup_submodules ;;
   configure) time_it "configure" configure ;;
   build_hadrian) time_it "build" build_hadrian ;;


=====================================
.gitlab/darwin/toolchain.nix
=====================================
@@ -113,6 +113,8 @@ pkgs.writeTextFile {
     export CABAL="$CABAL_INSTALL"
 
     sdk_path="$(xcrun --sdk macosx --show-sdk-path)"
-    export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-ffi-libraries=$sdk_path/usr/lib --with-ffi-includes=$sdk_path/usr/include/ffi --build=${targetTriple}"
+    : ''${CONFIGURE_ARGS:=}
+    CONFIGURE_ARGS+="''${CONFIGURE_ARGS:+ }--with-ffi-libraries=$sdk_path/usr/lib --with-ffi-includes=$sdk_path/usr/include/ffi --build=${targetTriple}"
+    export CONFIGURE_ARGS
   '';
 }



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ecdc4353d0a758e3336c24d5d0a7b484d903344c...887dc4fc5ad033b4dd2537e914d6d4a574b7fe23

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ecdc4353d0a758e3336c24d5d0a7b484d903344c...887dc4fc5ad033b4dd2537e914d6d4a574b7fe23
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/20230628/ef0f0938/attachment-0001.html>


More information about the ghc-commits mailing list