haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.62k stars 691 forks source link

Adding a --haddock-option rebuilds the world #5308

Open mitchellwrosen opened 6 years ago

mitchellwrosen commented 6 years ago

To reproduce:

This appears to rebuild the world due to a flag change, but it shouldn't have to. Only the haddocks need to be regenerated.

23Skidoo commented 6 years ago

/cc @merijn, I believe your work is relevant

merijn commented 6 years ago

Which version of cabal-install is this happening in? When I added the GHC flag filtering stuff I also added a filter which drops all haddock flags, so this should be fixed in HEAD.

merijn commented 3 years ago

@mitchellwrosen Is this issue still relevant?

mitchellwrosen commented 3 years ago

@merijn Well, my repro steps are rather clear, no?

But yes, I just tested again, and the issue is still relevant.

mitchellwrosen commented 3 years ago

Hm, maybe I spoke too soon. Did the --haddock-option flag get removed from cabal? I do see cabal reconfigure, but then it mysteriously fails with no output:

cabal-3.2.0.0: '/Users/mitchell/.ghcup/bin/haddock' exited with an error:

cabal: Failed to build documentation for blahblah-0.1.0.

However, the alias for this particular flag

cabal haddock --haddock-hyperlink-source

does appear to reconfigure the library, not rebuild the Haskell modules, and generate haddocks, as expected.