[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 8ff79e7 247/385: allow parallelism
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 8ff79e7 247/385: allow parallelism |
Date: |
Tue, 5 Oct 2021 23:59:40 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 8ff79e73bc121b9471375b0e04a85493e9ba2234
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
allow parallelism
---
cabal-ghcflags.sh | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/cabal-ghcflags.sh b/cabal-ghcflags.sh
index d491b66..6084b6c 100755
--- a/cabal-ghcflags.sh
+++ b/cabal-ghcflags.sh
@@ -16,7 +16,9 @@ mkdir -p "$TMP" 2> /dev/null || true
# to ensure the json plan is in place
echo "Resolving dependencies"
-cabal v2-build -v0 :all --dry
+# cabal v2-build -v0 :all --dry
+# best just ensure deps are compiled otherwise the repl compiles them
+cabal v2-build :all --only-dependencies
if [ ! -f dist-newstyle/cache/plan.json ] ; then
echo "dist-newstyle/cache/plan.json not found"
@@ -55,13 +57,13 @@ exec "$HSC2HS" "\$@"
EOF
chmod 755 "$TMP/hsc2hs"
-echo "Inspecting build plan"
-jq -c '(.["install-plan"][] | select(.["pkg-src"].type == "local") |
select(.["component-name"] != null) | [ .["pkg-name"], .["component-name"],
.["pkg-src"].path, .id ] )' dist-newstyle/cache/plan.json | while read LINE ; do
+create_ghcflags() {
+ LINE="$1"
+
NAME=$(echo "$LINE" | jq -r '.[0]')
PART=$(echo "$LINE" | jq -r '.[1]')
ROOT=$(echo "$LINE" | jq -r '.[2]')
ID=$(echo "$LINE" | jq -r '.[3]')
- # TODO this could be parallelised (if cabal can handle it!)
if [ "$PART" == "lib" ] ; then
COMPONENT="lib:$NAME"
@@ -89,8 +91,16 @@ jq -c '(.["install-plan"][] | select(.["pkg-src"].type ==
"local") | select(.["c
fi
fi
done
+}
+
+echo "Inspecting build plan"
+for LINE in $(jq -c '(.["install-plan"][] | select(.["pkg-src"].type ==
"local") | select(.["component-name"] != null) | [ .["pkg-name"],
.["component-name"], .["pkg-src"].path, .id ] )' dist-newstyle/cache/plan.json)
; do
+ # NOTE: could be done in parallel, but I haven't measured it being faster
+ create_ghcflags "$LINE"
done
+wait
+
if [ -d "$TMP" ] ; then
rm -rf "$TMP"
fi
- [nongnu] elpa/haskell-tng-mode b3e6c9a 113/385: compilation mode regression tests vs haskell-mode, (continued)
- [nongnu] elpa/haskell-tng-mode b3e6c9a 113/385: compilation mode regression tests vs haskell-mode, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 99a7f10 337/385: cleanup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e6d8761 343/385: local jump-to-definition should error, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c31afdb 272/385: missing CPP case, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 85c4dd5 233/385: fix bugfix in goto-import, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5c157fb 255/385: rigid ormolu support, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 64ec84d 260/385: if/then/else indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1d53572 243/385: bugfixes, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode d1e599a 285/385: switch formatting backend based on project config, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fd06b8f 264/385: move haskell-tng-newline into the -extra package, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8ff79e7 247/385: allow parallelism,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 4e2cf00 284/385: simplify the installation of hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1107e63 274/385: bump hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8475578 311/385: typos, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f8d2b91 295/385: miss some false positive ghc errors, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fca5c6e 315/385: better docs and cabal-install support, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b2e19c9 318/385: document next steps, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c39d0f4 321/385: some hsinspect tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5fe4cb1 359/385: cleanup test includes, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 38ed1b7 326/385: import types, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6d4e150 353/385: upgrade hsinspect version, ELPA Syncer, 2021/10/06