From 57e0b8876954fd3e344231dc1046ede0c006f1b9 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Mon, 1 Jul 2024 08:41:17 +0200 Subject: [PATCH 1/2] haddock-project: added `--all` switch Added `--all` (`--haddock-all`) switches for compatibility with `haddock` command. `--haddock-all` alias is added, since that's what is suggested by some warning messages. Fixes #10051 --- .../src/Distribution/Simple/Setup/Haddock.hs | 21 +++++++++++++++++++ changelog.d/issue-10051 | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 changelog.d/issue-10051 diff --git a/Cabal/src/Distribution/Simple/Setup/Haddock.hs b/Cabal/src/Distribution/Simple/Setup/Haddock.hs index e8d7ba54a20..aee2210d907 100644 --- a/Cabal/src/Distribution/Simple/Setup/Haddock.hs +++ b/Cabal/src/Distribution/Simple/Setup/Haddock.hs @@ -584,6 +584,27 @@ haddockProjectOptions _showOrParseArgs = haddockProjectForeignLibs (\v flags -> flags{haddockProjectForeignLibs = v}) trueArg + , option + "" + ["all", "haddock-all"] + "Run haddock for all targets" + ( \f -> + allFlags + [ haddockProjectExecutables f + , haddockProjectTestSuites f + , haddockProjectBenchmarks f + , haddockProjectForeignLibs f + ] + ) + ( \v flags -> + flags + { haddockProjectExecutables = v + , haddockProjectTestSuites = v + , haddockProjectBenchmarks = v + , haddockProjectForeignLibs = v + } + ) + trueArg , option "" ["internal"] diff --git a/changelog.d/issue-10051 b/changelog.d/issue-10051 new file mode 100644 index 00000000000..b582fc2b619 --- /dev/null +++ b/changelog.d/issue-10051 @@ -0,0 +1,4 @@ +synopsis: Added `--all` and `--haddock-all` switches to `haddock-project` subcommand +packages: cabal-install +issues: #10051 +prs: #2272 From 4ac692bbcfb0060b56c671071125c5aeb4880569 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Mon, 1 Jul 2024 08:49:36 +0200 Subject: [PATCH 2/2] Updated CONTRIBUTING guide --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fa1d5385d68..f9d24a6e113 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -344,7 +344,7 @@ description: { } ``` -Only the `synopsis` field is actually required, but you should also set the others where applicable. +Only the `synopsis` and `prs` fields are required, but you should also set the others where applicable. | Field | Description | | ----- | ----------- |