Skip to content

Commit

Permalink
Disable haddock for nightly stack snapshot on Windows
Browse files Browse the repository at this point in the history
This works around #2200
  • Loading branch information
avdv committed May 28, 2024
1 parent b4cfa8e commit 4578781
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ case "${MODE}" in
;;
esac > "${ZLIB_BUILD_FILE}"

WITH_HADDOCK=True

case "$GHC_VERSION" in
8.10.*)
SNAPSHOT=lts-18.28
Expand All @@ -218,6 +220,12 @@ case "$GHC_VERSION" in
SNAPSHOT=lts-22.22
;;
*)
# zlib >= 0.7.1.0 depends on zlib-clib on Windows (unless using pkg-config), since zlib-clib is
# a C only cabal library that does not produce any haddock this results in an error.
# See https://github.com/tweag/rules_haskell/issues/2200
if [ "$( uname )" = "WindowsNT" ]; then
WITH_HADDOCK=False
fi
SNAPSHOT=nightly-2024-05-24
stderr "warning: unsupported GHC version: ${GHC_VERSION}, using stack resolver ${SNAPSHOT}"
esac
Expand Down Expand Up @@ -273,6 +281,7 @@ stack_snapshot(
# disable calling pkg-config
flags = {"zlib": ["-pkg-config"]},
haddock = $WITH_HADDOCK,
# LTS snapshot published for ghc-${GHC_VERSION} (default version used by rules_haskell)
snapshot = "$SNAPSHOT",
Expand Down

0 comments on commit 4578781

Please sign in to comment.