From: Phillip Wood <phillip.wood123@gmail.com>
To: Patrick Steinhardt <ps@pks.im>, phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org, Karthik Nayak <karthik.188@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 3/3] meson: don't install git-pack-redundant(1) docs with breaking changes
Date: Mon, 17 Mar 2025 14:50:56 +0000 [thread overview]
Message-ID: <d341777a-a6e5-46fe-8004-9fe885321905@gmail.com> (raw)
In-Reply-To: <Z9gqP3ng0a9Zfpqc@pks.im>
Hi Patrick
On 17/03/2025 13:57, Patrick Steinhardt wrote:
> On Sun, Mar 16, 2025 at 03:19:48PM +0000, Phillip Wood wrote:
>> On 12/03/2025 13:17, Patrick Steinhardt wrote:
>>> +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()
>>> @@ -479,7 +486,9 @@ endif
>>> # Sanity check that we are not missing any tests present in 't/'. This check
I think this part of the comment must have been copied from somewhere else
>>> # 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()
>>> +configured_manpages += manpages_breaking_changes.keys()
>>> +configured_manpages += [ 'git-bisect-lk2009.adoc', 'git-tools.adoc' ]
>>
>> I don't think we need this hunk as we add manpages_breaking_changes into
>> manpages in the hunk above.
>
> We indeed need it: it's required in case the 'breaking_changes' option
> is enabled. In that case we still need to have the man pages here in
> this variable because we use it to check that the manpage is handled at
> all. Otherwise we would error out because Meson thinks that we forgot to
> wire up this manpage that we found in the source directory.
Oh so if we have selected breaking_changes then manpages.keys() does not
include "git-pack-redundant.adoc" but that file exists and so we need to
add it to the list of configured man pages. If breaking_changes is
selected then don't we end up adding "git-pack-redundant.adoc" to
configured_manpages twice? Does that matter when we come to do
actual_manpages = run_command(shell, '-c', 'ls git*.adoc scalar.adoc',
check: true,
env: script_environment,
).stdout().strip().split('\n')
if configured_manpages != actual_manpages
...
? Also I'm confused as to how that comparison works without sorting
configured_manpages. Even if manpages.keys() sorts the keys (the
documentation at [1] is silent on that) we add some out-of-order entries
to the end of the list.
Best Wishes
Phillip
[1] https://mesonbuild.com/Reference-manual_elementary_dict.html#dictkeys
next prev parent reply other threads:[~2025-03-17 14:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 13:17 [PATCH 0/3] meson: improve handling of `-Dbreaking_changes=true` Patrick Steinhardt
2025-03-12 13:17 ` [PATCH 1/3] meson: define WITH_BREAKING_CHANGES when enabling breaking changes Patrick Steinhardt
2025-03-12 13:17 ` [PATCH 2/3] meson: don't compile git-pack-redundant(1) with " Patrick Steinhardt
2025-03-12 13:17 ` [PATCH 3/3] meson: don't install git-pack-redundant(1) docs " Patrick Steinhardt
2025-03-13 11:07 ` Karthik Nayak
2025-03-16 15:19 ` Phillip Wood
2025-03-17 13:57 ` Patrick Steinhardt
2025-03-17 14:50 ` Phillip Wood [this message]
2025-03-18 10:06 ` Phillip Wood
2025-03-19 9:37 ` Patrick Steinhardt
2025-03-13 11:08 ` [PATCH 0/3] meson: improve handling of `-Dbreaking_changes=true` Karthik Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d341777a-a6e5-46fe-8004-9fe885321905@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=karthik.188@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).