emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/haskell-tng-mode a947ef0 249/385: support for projects wit


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode a947ef0 249/385: support for projects with custom Setup.hs
Date: Tue, 5 Oct 2021 23:59:41 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit a947ef0f320fe9afccb26d84a552bc221a802217
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    support for projects with custom Setup.hs
---
 cabal-ghcflags.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cabal-ghcflags.sh b/cabal-ghcflags.sh
index 6084b6c..2a9c5f9 100755
--- a/cabal-ghcflags.sh
+++ b/cabal-ghcflags.sh
@@ -67,6 +67,9 @@ create_ghcflags() {
 
     if [ "$PART" == "lib" ] ; then
         COMPONENT="lib:$NAME"
+    elif [ "$PART" == "setup" ] || [ "$PART" == "test:doctests" ] ; then
+        echo "  $NAME:$PART SKIPPED"
+        return 0;
     else
         COMPONENT="$PART"
     fi
@@ -94,10 +97,14 @@ create_ghcflags() {
 }
 
 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
+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
+# and again for custom Setup.hs builds...
+for LINE in $(jq -c '(."install-plan"[] | select(."pkg-src".type == "local") | 
select(."components" != null) | . as $p | .["components"] | keys[] | [ 
$p."pkg-name" , . , $p."pkg-src".path , $p.id] )' 
dist-newstyle/cache/plan.json) ; do
+    create_ghcflags "$LINE"
+done
 
 wait
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]