From: Jonathan Corbet <corbet@lwn.net>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/kernel-doc: remove an obscure logic from kernel-doc
Date: Tue, 18 Feb 2025 13:59:10 -0700 [thread overview]
Message-ID: <87wmdnm0kh.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20250214032457.6444ee93@foz.lan>
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
> With regards to the Python transition, since our Makefile allows
> switching to a different script since ever[1], I'm playing with
> the idea of sending a patch series with:
>
> Patch 1:
> - drops Sphinx version check from both kerneldoc
> (-sphinx-version parameter) and the corresponding Sphinx extension;
>
> patch 2:
> - renames kerneldoc to kerneldoc.pl
> - creates a symlink:
> kerneldoc.pl -> kerneldoc
>
> patch 3:
> - adds kerneldoc.py:
>
> patch 4:
> - add info messages on both versions related to the transition,
> and instructions about using KERNELDOC=<script> makefile and ask
> people to report eventual regressions with new script.
>
> patch 5:
> - change kerneldoc symlink to point to kerneldoc.py
>
> We can then keep both for maybe one Kernel cycle and see how it goes,
> stop accepting patches to the Perl version, in favor of doing the needed
> changes at the Python one.
>
> If everything goes well, we can remove the venerable Perl version on the
> upcoming merge window, and change the Sphinx extension to use the Python
> classes directly instead of running an external executable code.
>
> What do you think?
Seems like a fine plan in general. I wonder if we might want to keep
the old kernel-doc a bit longer just in case, but we can decide that as
we go.
> I'm in doubt if I should split the Kernel classes for the Python version
> into a scripts/lib/kdoc directory on this series or doing such change
> only after we drop the Perl version.
>
> Keeping it on a single file helps to do more complex code adjustments
> on a single place, specially if we end renaming/shifting stuff[2].
Do whatever makes it easiest for you at this point, I'd say.
> On a separate but related issue, perhaps we should start talking about
> coding style. We don't have anything defined at the Kernel, and
> different scripts follow different conventions (or most likely
> don't follow any convention at all). We should probably think having
> something defined in the future.
I've generally tried to stick to something that looks as close to the C
coding style as possible. Formalizing that might not be a bad idea at
all.
jon
next prev parent reply other threads:[~2025-02-18 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 6:02 [PATCH] scripts/kernel-doc: remove an obscure logic from kernel-doc Mauro Carvalho Chehab
2025-02-13 16:35 ` Jonathan Corbet
2025-02-14 2:24 ` Mauro Carvalho Chehab
2025-02-14 2:38 ` Randy Dunlap
2025-02-14 6:30 ` Mauro Carvalho Chehab
2025-02-18 20:59 ` Jonathan Corbet [this message]
2025-02-19 8:00 ` Mauro Carvalho Chehab
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=87wmdnm0kh.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.