Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-package Haddock CSS handling #10637

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cabal/src/Distribution/Simple/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ fromHaddockProjectFlags flags =
, argInterfaces = fromFlagOrDefault [] (haddockProjectInterfaces flags)
, argLinkedSource = Flag True
, argResourcesDir = haddockProjectResourcesDir flags
, argCssFile = haddockProjectCss flags
}

fromPackageDescription :: HaddockTarget -> PackageDescription -> HaddockArgs
Expand Down
3 changes: 2 additions & 1 deletion cabal-install/src/Distribution/Client/CmdHaddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ mkFlagsAbsolute :: NixStyleFlags ClientHaddockFlags -> IO (NixStyleFlags ClientH
mkFlagsAbsolute relFlags = do
let relHaddockFlags = haddockFlags relFlags
absHaddockOutputDir <- traverse makeAbsolute (haddockOutputDir relHaddockFlags)
return (relFlags{haddockFlags = relHaddockFlags{haddockOutputDir = absHaddockOutputDir}})
absHaddockCss <- traverse makeAbsolute (haddockCss relHaddockFlags)
return (relFlags{haddockFlags = relHaddockFlags{haddockOutputDir = absHaddockOutputDir, haddockCss = absHaddockCss}})

-- | The @haddock@ command is TODO.
--
Expand Down
11 changes: 11 additions & 0 deletions changelog.d/pr-10637
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
synopsis: Fix Haddock CSS handling in multi-package projects
packages: [cabal-install, Cabal]
prs: 10637
issues: [10636]
---

When `--css=<css-file>` flag is provided to `cabal haddock-project`:

- the Haddock index is now properly styled by the provided CSS file
- each package in the project now has their docs properly styled by the provided CSS file
Loading