haskell.nix icon indicating copy to clipboard operation
haskell.nix copied to clipboard

package..ghcOptions should be sent to the haddock command

Open pranaysashank opened this issue 1 year ago • 1 comments

Describe the bug

package..ghcOptions are not sent to haddock

Steps To Reproduce

  1. Add -XDuplicateRecordFields to a package that requires it in ghcOptions
  2. Build the haddock derivation (via nix-shell), haddock build fails because it doesn't have the DuplicateRecordFields extension enabled.

Expected behavior

ghcOptions gets passed to haddock via --optghc

Additional context

I faced this issue when upgrading to 9.8.1, a few packages that were building fine before now require DuplicateRecordFields behaviour with a warning that the behaviour will be deprecated in the future. As a temporary fix, I passed the ghcOptions in the module settings for the package (amazonka). This builds fine, but haddock building fails. I set doHaddock = false for the package as part of the temporary fix

  • Build system (eg. x86_64-linux or aarch64-darwin): x86)64-linux
  • GHC version: 9.8.1
  • Haskell.nix version (or commit) used: 1536b634296d5e82792d4d89d3690c851262bfb2

pranaysashank avatar Dec 17 '23 18:12 pranaysashank

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '24 02:04 stale[bot]

I have run into similar problems when GHC introduces new warnings. In 9.12, for example, deriving-typeable is now a warning. My haddock builds fail (which fails the entire build). The only solution I've found is disabling haddock for the particular component.

m4dc4p avatar Mar 06 '25 17:03 m4dc4p