1 synopsis: Enable recompilation avoidance during Haddock generation
2 packages: cabal-install
8 * Haddock no longer writes compilation files by default, so we do not need to
9 pass tmp dirs for `-hidir`, `-stubdir`, and `-odir` via `--optghc`. Indeed, we
10 do not *want* to do so, since it results in recompilation for every invocation
11 of Haddock via Cabal. We now stop this from happening for Haddock versions
12 2.28 and greater, since that is when Hi Haddock was introduced.
14 * We no longer define the `__HADDOCK_VERSION__` macro when invoking GHC through
15 Haddock, since doing so essentially guarantees recompilation during
16 documentation generation. We audited all uses of `__HADDOCK_VERSION__` in
17 hackage, ensuring there was a reasonable path forward to migrate away from
18 using `__HADDOCK_VERSION__` for each, while generating the same documentation
20 If you are a user of `__HADDOCK_VERSION__`, please take a look at the
21 discussion in https://github.com/haskell/cabal/pull/9177 and reach out to us
22 if your use case is not covered.
24 * Rename the `--haddock-lib` flag to `--haddock-resources-dir` (and
25 `haddock-lib:` cabal.project field to `haddock-resources-dir:`), and add this
26 flag to the users guide since it was missing an entry.
28 * `documentation: true` or `--enable-documentation` now implies `-haddock` for