Skip to content

Commit a6cf36f

Browse files
committed
Disable haddock for nightly stack snapshot on Windows
This works around #2200
1 parent b4cfa8e commit a6cf36f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

start

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ case "${MODE}" in
201201
;;
202202
esac > "${ZLIB_BUILD_FILE}"
203203

204+
WITH_HADDOCK=True
205+
204206
case "$GHC_VERSION" in
205207
8.10.*)
206208
SNAPSHOT=lts-18.28
@@ -218,6 +220,12 @@ case "$GHC_VERSION" in
218220
SNAPSHOT=lts-22.22
219221
;;
220222
*)
223+
# zlib >= 0.7.1.0 depends on zlib-clib on Windows (unless using pkg-config), since zlib-clib is
224+
# a C only cabal library that does not produce any haddock this results in an error.
225+
# See https://github.com/tweag/rules_haskell/issues/2200
226+
case "$( uname )" in
227+
WindowsNT | MINGW* | MSYS* ) WITH_HADDOCK=False ;;
228+
esac
221229
SNAPSHOT=nightly-2024-05-24
222230
stderr "warning: unsupported GHC version: ${GHC_VERSION}, using stack resolver ${SNAPSHOT}"
223231
esac
@@ -273,6 +281,7 @@ stack_snapshot(
273281
274282
# disable calling pkg-config
275283
flags = {"zlib": ["-pkg-config"]},
284+
haddock = $WITH_HADDOCK,
276285
277286
# LTS snapshot published for ghc-${GHC_VERSION} (default version used by rules_haskell)
278287
snapshot = "$SNAPSHOT",

0 commit comments

Comments
 (0)