[Git][ghc/ghc][wip/andreask/tools_unlines] Turn newlines into spaces for hadrian/ghci.

Andreas Klebinger gitlab at gitlab.haskell.org
Tue Mar 31 12:49:40 UTC 2020



Andreas Klebinger pushed to branch wip/andreask/tools_unlines at Glasgow Haskell Compiler / GHC


Commits:
a9d52538 by Andreas Klebinger at 2020-03-31T14:49:32+02:00
Turn newlines into spaces for hadrian/ghci.

The newlines break the command on windows.

- - - - -


2 changed files:

- hadrian/ghci-cabal
- hadrian/ghci-stack


Changes:

=====================================
hadrian/ghci-cabal
=====================================
@@ -2,5 +2,6 @@
 
 set -e
 
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
+# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')"
 ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m


=====================================
hadrian/ghci-stack
=====================================
@@ -2,5 +2,6 @@
 
 set -e
 
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
+# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')"
 stack exec -- ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a9d525389b3e560e9760ac550bba82656b3b415b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a9d525389b3e560e9760ac550bba82656b3b415b
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/20200331/1f82f37d/attachment.html>


More information about the ghc-commits mailing list