Skip to content

Commit 2e3a85b

Browse files
authored
Run custom preprocessors before setup haddock (#2386)
* Run custom preprocessors before `setup haddock` Run `setup build --with-ghc=false || true` before running `setup haddock` to make sure the preprocessor outputs of any custom build step are present. Fixes #2243 * Reduce number of tests
1 parent 2243adf commit 2e3a85b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

builder/haddock-builder.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ let
109109
110110
# If we don't have any source files, no need to run haddock
111111
[[ -n $(find . -name "*.hs" -o -name "*.lhs") ]] && {
112+
# Run any preprocessor in the custom build step
113+
$SETUP_HS build \
114+
"--with-ghc=false" \
115+
${lib.optionalString (haskellLib.isTest componentId) "--tests"} \
116+
${lib.concatStringsSep " " setupHaddockFlags} || true
117+
112118
$SETUP_HS haddock \
113119
"--html" \
114120
${lib.optionalString (haskellLib.isTest componentId) "--tests"} \

ci.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@
6666
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
6767
# Update supported-ghc-versions.md to reflect any changes made here.
6868
nixpkgs.lib.optionalAttrs (builtins.elem nixpkgsName ["R2411" "R2505"]) {
69-
ghc96 = true;
70-
ghc98 = true;
71-
ghc910 = true;
72-
ghc912 = true;
69+
ghc96 = false;
70+
ghc98 = false;
71+
ghc910 = false;
72+
ghc912 = false;
7373
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
7474
ghc96 = true;
7575
ghc98 = true;

0 commit comments

Comments
 (0)