cabal haddock: imply dependencies, but gentler, i.e. don't override config/project settings#11002
cabal haddock: imply dependencies, but gentler, i.e. don't override config/project settings#11002ulysses4ever wants to merge 1 commit intomasterfrom
Conversation
|
looks like global config gets |
ba00b45 to
fe92864
Compare
|
Trying to flip the default from |
766d075 to
c245c8e
Compare
c245c8e to
60c83c5
Compare
|
@coot a haddock-project integration test: cabal/cabal-install/tests/IntegrationTests2.hs Lines 2796 to 2820 in d958545 fails with the patch here. This is probably due to switching from |
|
It is a bit surprising that |
This is a WIP to fix #8725 as outlined in #8725 (comment).
High-level idea. Project configuration is built out of two pieces: config/project file settings and command-line flags:
projectConfig <> cliConfig.The way "cabal haddock implying --enable-documentation" (#8259 #8330) was implemented is it modified the latter (CLI flags). But that made the resulting code ignore anything from config/project files (flags are a
Lastmonoid).The idea here is instead of modifying CLI flags, add command-specific "default settings" (can differ between
cabal's subcommands) that are prepended to the result, so:defaultConfigPerCommand <> projectConfig <> cliConfig.I hope the high-level idea makes sense but I invite comments.
A low-level issue that I currently need input for is described in comments above, and in a nutshell, I want to know if flipping a default for
documentationfromFlag FalsetoNoFlaglooks okay. This asumes thatNoFlagwill turn intoFalseeventually anyways.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.