All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: Proposal for handling .hx files with Sphinx
Date: Tue, 21 Jan 2020 14:50:20 +0100	[thread overview]
Message-ID: <87lfq0dilf.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA8C0-HyqnJjc6Bik8E3w3goWr-KB+daObGDp7ZcXqxYDA@mail.gmail.com> (Peter Maydell's message of "Tue, 21 Jan 2020 11:52:48 +0000")

Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 21 Jan 2020 at 11:12, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> On Tue, 21 Jan 2020 at 06:40, Markus Armbruster <armbru@redhat.com> wrote:
>> > John Snow <jsnow@redhat.com> writes:
>> > > Still, I do want to ask: Are we sure we want to double-down on keeping
>> > > the .hx files around instead of trying to move to a more generic data
>> > > format?
>> >
>> > One the one hand, I'd prefer to invest as little as practical into .hx.
>> > On the other hand, adding more hard dependencies on QAPIfication is not
>> > a good idea.
>> >
>> > What's the stupidest solution that could possibly work now?  Is it the
>> > one Peter sketched?
>>
>> FWIW, I wrote some code for the Sphinx extension approach yesterday,
>> along the 'simplest possible thing' lines. It's less than 200 lines
>> of Python (though I still need to put in the support for DEFHEADING
>> and ARCHHEADING). The actual texinfo fragments in the various .hx
>> files of course would also need to be hand-converted to rST, same
>> as the hand-written manual .texi file contents.
>
> Incidentally, I am definitely coming to the conclusion that the
> best way to do generation of docs to go in Sphinx manuals is
> to use/write a Sphinx extension -- this lets you properly create
> doctree nodes, for instance and it fits the flow better. So a
> in potential future where we were generating these docs from
> json, I think we'd want to have a Sphinx extension driving the
> 'parse the json for docs', rather than a separate script that
> spit out rst-format-text to include.

I trust your judgement.

Since the Sphinx extension is in Python, we can try to reuse the QAPI
frontend there.  We'll see.

I'd like to encourage you to not feel bound to the existing doc comment
language.  When Marc-André created the doc generator, he chose to fit
the doc comment language to the existing doc comments, to avoid churn.
That was probably the right decision then; getting the job done was
tough enough as it was.  The resulting language was basically defined by
its (ad hoc!) parser.  I cleaned up the parser some, and
retro-documented the syntax.  It's still an idiosyncratic mess, to be
honest.



      reply	other threads:[~2020-01-21 14:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 17:30 Proposal for handling .hx files with Sphinx Peter Maydell
2020-01-20 14:39 ` Stefan Hajnoczi
2020-01-21  0:20 ` John Snow
2020-01-21  6:40   ` Markus Armbruster
2020-01-21 11:12     ` Peter Maydell
2020-01-21 11:52       ` Peter Maydell
2020-01-21 13:50         ` Markus Armbruster [this message]

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=87lfq0dilf.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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.