From: Jani Nikula <jani.nikula@intel.com>
To: Markus Heiser <markus.heiser@darmarit.de>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jonathan Corbet <corbet@lwn.net>,
Grant Likely <grant.likely@secretlab.ca>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Dan Allen <dan@opendevise.io>,
Russel Winder <russel@winder.org.uk>,
Keith Packard <keithp@keithp.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH 00/10] Documentation/Sphinx
Date: Mon, 30 May 2016 23:05:34 +0300 [thread overview]
Message-ID: <87k2ibfh0x.fsf@intel.com> (raw)
In-Reply-To: <5369C8B8-47F2-4B67-A314-5EB5471ABA00@darmarit.de>
On Mon, 30 May 2016, Markus Heiser <markus.heiser@darmarit.de> wrote:
> Am 30.05.2016 um 16:46 schrieb Jani Nikula <jani.nikula@intel.com>:
>> I am not proposing to merge the documents that I've converted mostly as
>> samples in the branch. I needed something to demonstrate the build is
>> sane.
>
>> The authors of the DocBook documents should make the conversions as they
>> see fit, when they see fit, with the tools they see fit, probably with
>> some manual work on top.
>
> OK
To be clear, the "sphinx-for-docs-next" branch of [1], [2] is what I
propose to merge at this time. There's the Sphinx configuration, kernel
build integration, Sphinx kernel-doc extension, tons of kernel-doc
updates, etc. There is no DocBook tmpl conversion; all of that is left
to the authors (owners, maintainers) of the documents, but this enables
them to focus on that part.
I was planning on sending out the patches after some feedback here.
[1] git://people.freedesktop.org/~jani/drm
[2] https://cgit.freedesktop.org/~jani/drm/log/?h=sphinx-for-docs-next
> With DocBook, it was hard to separate a file into small chunks (see media for
> how it is done). With Sphinx, it is common to split a document in small chunks
> (along parts, chapters, sections ...) Thats why I recommend chunking documents
> (from the beginning).
Agreed, but up to the authors.
>> One of the goals was to have nice cross-referencing between the
>> documents (e.g. from GPU to kernel or device driver API). And it works.
>
> For this, Sphinx-doc brings intersphinx: http://www.sphinx-doc.org/en/stable/ext/intersphinx.html
If the kernel is split to several intersphinx "prefixes", we won't know
the prefix of the link targets when we're generating the references in
kernel-doc. Also, can be deferred to follow-up work if someone figures
out the how.
> I can't recommend to use rst2pdf (it is less maintained), use default
> sphinx LaTeX toolchain.
I think we'll use whatever works, rst2pdf seemed to work for now, but we
can change if needed.
>> I find it totally unacceptable to require explicitly marking kernel-doc
>> comments or source files as being reStructuredText.
>> Note that it's all opt-in already. If you add a .rst file that includes
>> kernel-doc via the kernel-doc extension, you better make sure the
>> comments parse as reStructuredText and render nicely. I'm willing to do
>> much of the job for all the things that I care about.
>
> We have a different POV ... I try to build up a documentation project,
> which could use all given kernel-doc markups without any change, where
> reST is an "addition". Your approach is to fix kernel-doc comments
> if they are referred by a kernl-doc directive in a .rst document.
> There is nothing wrong about your approach, but I try to build
> a whole source code documentation like the one I started here:
> http://return42.github.io/sphkerneldoc/linux_src_doc/index.html
That looks nice, but I'll argue it would not be much worse even if you
assumed it's all rst.
The bigger point is, if you expect people to tag each source file or
kernel-doc comment with "rst", you'll end up with a mess where some
places have that tag, some not, but it's not conclusive about whether
they actually *are* rst or not. (And you've had tons of patch churn to
add those tags to get there.)
The kernel-doc comments are written by humans who will screw it up
anyway. (Apologies for the distrust, fellow developers, but I've been
reading too many of your fine kernel-doc comments lately.) People will
happily cargo cult rst and current kernel-doc and javadoc and doxygen
and whatnot in a fruit salad. The only thing that will help in the end
is keeping the rules simple and consistent and having the feedback from
the tools.
> I worry a little bit in that reST will be only one more toolchain
> beside DocBook .. in the long term, kernel's documentation
> should get rid of all the DocBook artifacts and for this a more
> comprehensive solution is needed.
We agree on the end goal, eradicate DocBook. I must say that in my
experiments, apart from the media docs, almost everything converts
surprisingly nicely or IMO "good enough" with just the tmplcvt script in
this series. Do remember that this is a one time conversion. It needs to
be good enough that there's not too much manual editing involved, but it
doesn't need to be perfect. Some degree of editing will be required no
matter what, not least because the DocBook has also been written by
humans, and the battle against the GIGO principle is a lost one.
>> And with Jani's big pile of kernel-doc
>> patches we now also have someone who understands that perl script,
>> which is awesome.
>
> ?
I must also question any sentence that implies I understand perl. ;)
>> In short I want to go nuts improving the docs themselves and stop
>> discussing the tooling to build them. Can we please make this happen?
>>
>> Note that Jani's already started to throw out our old ascidoc hacks in
>> the topic/kerneldoc branch in the drm-intel.git repo, and we'll switch
>> over the autobuilder for the 01.org docs as soon as that's done. We're
>> committed, I want this ;-)
It's done, we're feeding this to our integration tree and dogfooding.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
next prev parent reply other threads:[~2016-05-30 20:05 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 13:39 [PATCH 00/10] Documentation/Sphinx Jani Nikula
2016-05-20 13:39 ` [PATCH 01/10] kernel-doc: fix use of uninitialized value Jani Nikula
2016-05-20 13:39 ` [PATCH 02/10] kernel-doc: support printing exported and non-exported symbols Jani Nikula
2016-05-20 13:39 ` [PATCH 03/10] Documentation/sphinx: add basic working Sphinx configuration and build Jani Nikula
2016-05-20 13:39 ` [PATCH 04/10] Documentation: add .gitignore Jani Nikula
2016-05-20 13:39 ` [PATCH 05/10] Documentation/sphinx: add Sphinx kernel-doc directive extension Jani Nikula
2016-06-03 20:35 ` Jonathan Corbet
2016-06-04 6:57 ` Markus Heiser
2016-05-20 13:39 ` [PATCH 06/10] Documentation/sphinx: configure the kernel-doc extension Jani Nikula
2016-05-20 13:39 ` [PATCH 07/10] sphinx: cheesy script to convert .tmpl files Jani Nikula
2016-05-20 13:39 ` [PATCH 08/10] Documentation: add kernel hacking rst Jani Nikula
2016-05-20 13:39 ` [PATCH 09/10] Documentation: add kernel api rst Jani Nikula
2016-05-20 13:39 ` [PATCH 10/10] Documentation: moar files Jani Nikula
2016-05-29 20:33 ` [PATCH 00/10] Documentation/Sphinx Jani Nikula
2016-05-30 9:10 ` Daniel Vetter
2016-05-30 10:47 ` Markus Heiser
2016-05-30 14:46 ` Jani Nikula
2016-05-30 15:29 ` Daniel Vetter
2016-05-30 16:39 ` Markus Heiser
2016-05-30 20:05 ` Jani Nikula [this message]
2016-05-30 21:23 ` Mauro Carvalho Chehab
2016-05-31 10:16 ` Markus Heiser
2016-06-24 10:40 ` Mauro Carvalho Chehab
2016-06-27 6:15 ` Markus Heiser
2016-06-27 17:08 ` Mauro Carvalho Chehab
2016-06-29 12:41 ` Markus Heiser
2016-05-31 7:27 ` Markus Heiser
2016-05-31 8:07 ` Daniel Vetter
2016-05-31 9:39 ` Markus Heiser
2016-05-31 10:30 ` Jani Nikula
2016-05-31 11:12 ` Markus Heiser
2016-06-03 20:47 ` rst2pdf (was [PATCH 00/10] Documentation/Sphinx) Jonathan Corbet
2016-06-07 6:02 ` Markus Heiser
2016-06-07 6:44 ` Jani Nikula
2016-06-10 17:08 ` Markus Heiser
2016-06-03 21:04 ` [PATCH 00/10] Documentation/Sphinx Jonathan Corbet
2016-06-03 22:54 ` Daniel Vetter
2016-06-04 11:45 ` Jani Nikula
2016-06-01 1:07 ` Jonathan Corbet
2016-06-01 6:42 ` Daniel Vetter
2016-06-03 20:16 ` Jonathan Corbet
2016-06-03 20:24 ` Daniel Vetter
2016-06-03 20:27 ` Jonathan Corbet
2016-06-04 13:01 ` Jani Nikula
2016-06-04 12:54 ` Jani Nikula
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=87k2ibfh0x.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=corbet@lwn.net \
--cc=dan@opendevise.io \
--cc=daniel.vetter@ffwll.ch \
--cc=grant.likely@secretlab.ca \
--cc=hverkuil@xs4all.nl \
--cc=keithp@keithp.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.heiser@darmarit.de \
--cc=mchehab@osg.samsung.com \
--cc=russel@winder.org.uk \
/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