git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] docs: fix check-docs with WITH_BREAKING_CHANGES

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Mar 9, 2025, 10:52 UTC
Message-ID
<1d9ab1ed-54bf-4359-85c2-28060cbf7198@gmail.com>
In-Reply-To
<CAOLa=ZRdqk-VXX4LWptqx3C3ABxNcxU+5cDTPxWt3k9UW1m3OA@mail.gmail.com>
Hi Karthik
On 07/03/2025 22:42, Karthik Nayak wrote:
Show 30 quoted lines
> FPhillip Wood <phillip.wood123@gmail.com> writes:
> 
>> On 07/03/2025 10:32, Phillip Wood wrote:
>>> On 05/03/2025 15:53, Junio C Hamano wrote:
>>>> We correctly omit builtin/pack-objects.o from BUILTIN_OBJS, but
>>>> forgot to add "git pack-redundant" on the EXCLUDED_PROGRAMS list,
>>>> which made "make check-docs" target notice that the command has been
>>>> removed but still is documented.
>>>>
>>>> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>>>> ---
>>>>    * The command is still listed in the resulting "git help git"
>>>>      output, as cmd-list.perl does not yet know which commands on the
>>>>      list are to be ignored under WITH_BREAKING_CHANGES.
>>>
>>> Good catch. It seems the meson build was also forgotten in 68f51871df8
>>> (builtin/pack-redundant: remove subcommand with breaking changes,
>>> 2025-01-22) as we still compile builtin/pack-redundant.c and build the
>>> documentation. We should probably wrap the function declaration for
>>> cmd_pack_redundant() in builtin.h with "#ifndef WITH_BREAKING_CHANGES"
>>> as well though I don't think that is urgent.
>>
>> I just had a look at fixing the meson build but it seems to be tricky as
>> the manpage sources are stored in a meson dictionary and meson
>> dictionaries are immutable so I don't know how one is supposed to
>> conditionally add items.
>>
> 
> But dictonaries can be combined [1]. So we could probably do something
> like I've added below.

Thanks, my web search took me to a different page in the documentation [1]. Looking carefully there is an example of adding an element to a dictionary right at the end of that section but it is not mentioned anywhere in the text. I do find the meson documentation hard to use.

I think it would be best if someone with more knowledge of meson than me took this forward

Thanks
Phillip
[1] https://mesonbuild.com/Syntax.html#dictionaries
Show 43 quoted lines
> [1]: https://mesonbuild.com/Reference-manual_elementary_dict.html
> 
> -- 8< --
> 
> diff --git a/Documentation/meson.build b/Documentation/meson.build
> index 0a0f2bfa14..fcfec63e9b 100644
> --- a/Documentation/meson.build
> +++ b/Documentation/meson.build
> @@ -96,7 +96,6 @@ manpages = {
>     'git-notes.adoc' : 1,
>     'git-p4.adoc' : 1,
>     'git-pack-objects.adoc' : 1,
> -  'git-pack-redundant.adoc' : 1,
>     'git-pack-refs.adoc' : 1,
>     'git-patch-id.adoc' : 1,
>     'git-prune-packed.adoc' : 1,
> @@ -205,6 +204,14 @@ manpages = {
>     'gitworkflows.adoc' : 7,
>   }
> 
> +manpages_breaking_changes = {
> +    'git-pack-redundant.adoc' : 1,
> +}
> +
> +if not get_option('breaking_changes')
> +  manpages += manpages_breaking_changes
> +endif
> +
>   docs_backend = get_option('docs_backend')
>   if docs_backend == 'auto'
>     if find_program('asciidoc', dirs: program_path, required: false).found()
> @@ -475,7 +482,7 @@ endif
>   # Sanity check that we are not missing any tests present in 't/'. This check
>   # only runs once at configure time and is thus best-effort, only. Furthermore,
>   # it only verifies man pages for the sake of simplicity.
> -configured_manpages = manpages.keys() + [ 'git-bisect-lk2009.adoc',
> 'git-tools.adoc' ]
> +configured_manpages = manpages.keys() +
> manpages_breaking_changes.keys() + [ 'git-bisect-lk2009.adoc',
> 'git-tools.adoc' ]
>   actual_manpages = run_command(shell, '-c', 'ls git*.adoc scalar.adoc',
>     check: true,
>     env: script_environment,
Previous: Karthik NayakNext: Phillip Wood
Message 12 of 17 in “docs: fix repository-layout when building with breaking changes”
  1. docs: fix repository-layout when building with breaking changesPhillip Wood via GitGitGadget, Mar 3, 2025
  2. Junio C HamanoMar 3, 2025
  3. Patrick SteinhardtMar 4, 2025
  4. Phillip WoodMar 4, 2025
  5. Junio C HamanoMar 4, 2025
  6. docs: fix repository-layout when building with breaking changesPhillip Wood via GitGitGadget, Mar 5, 2025
  7. docs: fix check-docs with WITH_BREAKING_CHANGESJunio C Hamano, Mar 5, 2025
  8. Phillip WoodMar 7, 2025
  9. Phillip WoodMar 7, 2025
  10. Junio C HamanoMar 7, 2025
  11. Karthik NayakMar 7, 2025
  12. Phillip WoodMar 9, 2025
  13. Phillip WoodMar 9, 2025
  14. Patrick SteinhardtMar 10, 2025
  15. Patrick SteinhardtMar 11, 2025
  16. phillip.wood123@gmail.comMar 12, 2025
  17. Patrick SteinhardtMar 12, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.