Skip to content

Commit

Permalink
Draft: Work around cabal issues
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Dec 10, 2024
1 parent f27e294 commit 08ba505
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
active-repositories: hackage.haskell.org
EOF
fi
cat >> $CABAL_CONFIG <<EOF
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
tag: 730a0ed799c91324d42b70d3780d6b3215cafc3c
EOF
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
echo "$($HCPKG list --simple-output | xargs -d' ' -n 1 | grep -v "^Cabal" | sed -E 's/([a-zA-Z-]+)-[0-9.]+/allow\-newer\: *:\1/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|singletons|singletons-base|singletons-base-code-generator|singletons-th)$/; }' >> cabal.project.local
cat cabal.project
Expand Down
3 changes: 3 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ jobs-selection: any
haddock-components: libs
-- Needed to avoid https://github.com/haskell/cabal/issues/9917
installed: +all -Cabal -Cabal-syntax
-- Needed to work around https://github.com/haskell/cabal/issues/6522 and
-- https://github.com/haskell/cabal/issues/10500
github-patches: github.yml.patch
22 changes: 22 additions & 0 deletions github.yml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml
index f872bb9..e7eaa05 100644
--- a/.github/workflows/haskell-ci.yml
+++ b/.github/workflows/haskell-ci.yml
@@ -184,7 +184,7 @@ jobs:
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
- active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
+ active-repositories: hackage.haskell.org
EOF
fi
cat >> $CABAL_CONFIG <<EOF
@@ -261,7 +261,7 @@ jobs:
tag: 730a0ed799c91324d42b70d3780d6b3215cafc3c
EOF
if $HEADHACKAGE; then
- echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
+ echo "$($HCPKG list --simple-output | xargs -d' ' -n 1 | grep -v "^Cabal" | sed -E 's/([a-zA-Z-]+)-[0-9.]+/allow\-newer\: *:\1/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|singletons|singletons-base|singletons-base-code-generator|singletons-th)$/; }' >> cabal.project.local
cat cabal.project

0 comments on commit 08ba505

Please sign in to comment.