[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ikl21a5u.fsf@trenco.lwn.net>
Date: Wed, 11 Jun 2025 11:05:17 -0600
From: Jonathan Corbet <corbet@....net>
To: "Darrick J. Wong" <djwong@...nel.org>, Bagas Sanjaya <bagasdotme@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux
Documentation <linux-doc@...r.kernel.org>, Linux ext4
<linux-ext4@...r.kernel.org>, Theodore Ts'o <tytso@....edu>, Andreas
Dilger <adilger.kernel@...ger.ca>, "Ritesh Harjani (IBM)"
<ritesh.list@...il.com>
Subject: Re: [PATCH] Documentation: ext4: atomic_writes: Remove
cross-reference labels
"Darrick J. Wong" <djwong@...nel.org> writes:
> On Tue, Jun 10, 2025 at 04:11:59PM +0700, Bagas Sanjaya wrote:
>> Sphinx reports htmldocs warnings on ext4 atomic block writes docs:
>>
>> Documentation/filesystems/ext4/atomic_writes.rst:5: WARNING: duplicate label atomic_writes, other instance in Documentation/filesystems/ext4/atomic_writes.rst
>> Documentation/filesystems/ext4/atomic_writes.rst:207: WARNING: duplicate label atomic_write_bdev_support, other instance in Documentation/filesystems/ext4/atomic_writes.rst
>>
>> These warnings reference duplicated cross-reference labels to themselves in
>> the same doc, which are because atomic_writes.rst is transcluded in
>> overview.rst via include:: directive, thus the culprit docs get processed
>> twice.
>
> <confused> How is that possible? atomic_writes.rst is only "include::"d
> once in overview.rst. Is the file implicitly included through some
> other means?
Sphinx wants to snarf up every .rst file it sees, regardless of whether
it is explicitly made part of the document tree. So it will pick up
atomic_writes.rst separately from the include.
This could be "fixed" by removing the .rst extension from the included
file. But, since there is no use of the atomic_writes label to begin
with, it's better to just take it out. The other fix, removing a cross
reference, is not entirely ideal, but there is little text between the
label and the reference.
jon
Powered by blists - more mailing lists