[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201015073207.7504a55b@coco.lan>
Date: Thu, 15 Oct 2020 07:32:07 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Eric Biggers <ebiggers@...nel.org>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
"Jonathan Corbet" <corbet@....net>,
"Theodore Y. Ts'o" <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>,
linux-fscrypt@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 35/80] docs: fs: fscrypt.rst: get rid of :c:type:
tags
Em Wed, 14 Oct 2020 14:59:54 -0700
Eric Biggers <ebiggers@...nel.org> escreveu:
> On Wed, Oct 14, 2020 at 08:59:07AM +0200, Mauro Carvalho Chehab wrote:
> > [PATCH v6.1 35/80] docs: fs: fscrypt.rst: get rid of :c:type: tags
> >
> > The :c:type: tag has problems with Sphinx 3.x, as structs
> > there should be declared with c:struct.
> >
> > So, remove them, relying at automarkup.py extension to
> > convert them into cross-references.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
>
> "relying at" => "relying on".
>
> Otherwise looks fine, you can add:
>
> Reviewed-by: Eric Biggers <ebiggers@...gle.com>
Thank you for reviewing it!
> I do still wonder about your comment though:
>
> > It should be said that, currently, if there's no documentation for "foo",
> > automarkup will just keep using the regular text font, keeping the text
> > untouched.
>
> That will apply to most (maybe all) of the structures mentioned in this file.
> I expected that if the documentation system now automatically recognizes
> 'struct foo', then it would render it in code font even when 'struct foo' isn't
> documented. Any particular reason why that isn't the case? Not like I care
> much myself, but it's a bit unexpected and it means this change actually makes
> the rendered documentation look worse...
Yeah, I agree that using monospaced fonts on this case too would
be nice. The C domain actually uses italic monospaced fonts for
broken XREFs.
I suspect that changing this at automarkup.py would be simple, but
not sure if it would be safe.
Jon can tell more about that, as he's the author of automarkup,
but I suspect that the reason for the current behavior is to avoid
false-positives.
I mean, if "struct foo" symbol doesn't exist at the C domain, this
might mean that the parser is doing something wrong. So, a more
conservative approach is to keep the string as-is.
On the other hand, if one finds a valid "struct foo" using normal
fonts, this would mean that either the doc is outdated, mentioning
an struct that were removed/renamed or that there's a missing
kernel-doc markup.
In any case, the fix is to simply fix the kernel-doc markup for
struct foo.
I guess in the future automarkup.py could issue a warning in
order to warn about missing cross-references, perhaps when
W=1 or W=2 is used.
Thanks,
Mauro
Powered by blists - more mailing lists