Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-30 Thread Miguel Ojeda
On Tue, Mar 30, 2021 at 1:07 PM Jani Nikula wrote: > > FWIW, and this should be obvious, I think going with what's natural for > documenting Rust source code is the right choice. Markdown as parsed by > rustdoc. People will expect Rust documentation comments to just work, > without some kernel

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-30 Thread Matthew Wilcox
On Tue, Mar 30, 2021 at 02:43:45PM +0200, Markus Heiser wrote: > > Am 30.03.21 um 13:35 schrieb Jani Nikula: > > > If the introduction were "/*rST" instead of "/**", would we have > > > consensus? It gives us a path to let people intermix kernel-doc and > > > hawkmoth comments in the same file,

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-30 Thread Markus Heiser
Am 30.03.21 um 13:35 schrieb Jani Nikula: If the introduction were "/*rST" instead of "/**", would we have consensus? It gives us a path to let people intermix kernel-doc and hawkmoth comments in the same file, which would be amazing. If you want to allow two syntaxes for documentation

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-30 Thread Jani Nikula
On Mon, 29 Mar 2021, Matthew Wilcox wrote: > On Mon, Mar 29, 2021 at 09:33:30PM +0300, Jani Nikula wrote: >> On Mon, 29 Mar 2021, Matthew Wilcox wrote: >> > So here's my "modest proposal": >> > >> > - Similar to our ".. kernel-doc::" invocation in .rst files, handle >> >".. rustdoc::"

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-30 Thread Jani Nikula
On Mon, 29 Mar 2021, Miguel Ojeda wrote: > On Thu, Mar 25, 2021 at 11:18 PM Matthew Wilcox wrote: >> >> The rust code is alredy coming though ... >> >> rust/kernel/buffer.rs:/// A pre-allocated buffer that implements >> [`core::fmt::Write`]. >> >> so now we have three formats. Markdown and RST

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-29 Thread Miguel Ojeda
On Thu, Mar 25, 2021 at 11:18 PM Matthew Wilcox wrote: > > The rust code is alredy coming though ... > > rust/kernel/buffer.rs:/// A pre-allocated buffer that implements > [`core::fmt::Write`]. > > so now we have three formats. Markdown and RST are _very_ similar, but > not identical [1]. Oh,

Re: kerneldoc and rust (was [PATCH] kernel-doc: better handle '::' sequences)

2021-03-29 Thread Miguel Ojeda
On Mon, Mar 29, 2021 at 9:34 PM Jonathan Corbet wrote: > > If we're going to talk about incorporating Rust into the doc system, we > should probably include some Rust folks - thus, I'm adding Miguel. Thanks a lot Jonathan for the Cc! I will read and answer the other emails. Cheers, Miguel

Re: kerneldoc and rust (was [PATCH] kernel-doc: better handle '::' sequences)

2021-03-29 Thread Jonathan Corbet
Matthew Wilcox writes: If we're going to talk about incorporating Rust into the doc system, we should probably include some Rust folks - thus, I'm adding Miguel. > On Thu, Mar 25, 2021 at 04:30:32PM -0600, Jonathan Corbet wrote: >> Matthew Wilcox writes: >> >> We did come to the mutual

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-29 Thread Matthew Wilcox
On Mon, Mar 29, 2021 at 09:33:30PM +0300, Jani Nikula wrote: > On Mon, 29 Mar 2021, Matthew Wilcox wrote: > > So here's my "modest proposal": > > > > - Similar to our ".. kernel-doc::" invocation in .rst files, handle > >".. rustdoc::" (insert weeks of hacking here) > > - Now add "..

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-29 Thread Jani Nikula
On Mon, 29 Mar 2021, Matthew Wilcox wrote: > On Thu, Mar 25, 2021 at 04:30:32PM -0600, Jonathan Corbet wrote: >> Matthew Wilcox writes: >> >> > The rust code is alredy coming though ... >> > >> > rust/kernel/buffer.rs:/// A pre-allocated buffer that implements >> > [`core::fmt::Write`]. >> >

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-29 Thread Matthew Wilcox
On Thu, Mar 25, 2021 at 04:30:32PM -0600, Jonathan Corbet wrote: > Matthew Wilcox writes: > > > The rust code is alredy coming though ... > > > > rust/kernel/buffer.rs:/// A pre-allocated buffer that implements > > [`core::fmt::Write`]. > > > > so now we have three formats. Markdown and RST

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-25 Thread Jonathan Corbet
Matthew Wilcox writes: > The rust code is alredy coming though ... > > rust/kernel/buffer.rs:/// A pre-allocated buffer that implements > [`core::fmt::Write`]. > > so now we have three formats. Markdown and RST are _very_ similar, but > not identical [1]. Oh, and even better we now have three

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-25 Thread Matthew Wilcox
On Thu, Mar 25, 2021 at 03:04:00PM -0600, Jonathan Corbet wrote: > Matthew Wilcox writes: > > Well ... > > > > If somebody wants to write a new tool (*) that extracts documentation > > written in a different format, I think that could be done. Because the > > hard part of writing documentation

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-25 Thread Jonathan Corbet
Matthew Wilcox writes: > On Thu, Mar 25, 2021 at 12:51:25PM -0600, Jonathan Corbet wrote: >> Mauro Carvalho Chehab writes: >> >> > Right now, if one of the following headers end with a '::', the >> > kernel-doc script will do the wrong thing: >> > >> >

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-25 Thread Matthew Wilcox
On Thu, Mar 25, 2021 at 12:51:25PM -0600, Jonathan Corbet wrote: > Mauro Carvalho Chehab writes: > > > Right now, if one of the following headers end with a '::', the > > kernel-doc script will do the wrong thing: > > > > description|context|returns?|notes?|examples? > > > > The real issue

Re: [PATCH] kernel-doc: better handle '::' sequences

2021-03-25 Thread Jonathan Corbet
Mauro Carvalho Chehab writes: > Right now, if one of the following headers end with a '::', the > kernel-doc script will do the wrong thing: > > description|context|returns?|notes?|examples? > > The real issue is with examples, as people could try to write > something like: > >

[PATCH] kernel-doc: better handle '::' sequences

2021-03-25 Thread Mauro Carvalho Chehab
Right now, if one of the following headers end with a '::', the kernel-doc script will do the wrong thing: description|context|returns?|notes?|examples? The real issue is with examples, as people could try to write something like: example:: /* Some C code */