lkml.org 
[lkml]   [2019]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 12/14] doc-rst: add ABI documentation to the admin-guide book
    Em Mon, 17 Jun 2019 15:36:17 +0300
    Jani Nikula <jani.nikula@linux.intel.com> escreveu:

    > On Fri, 14 Jun 2019, Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
    > > Em Fri, 14 Jun 2019 16:06:03 +0200
    > > Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
    > >
    > >> On Fri, Jun 14, 2019 at 04:42:20PM +0300, Jani Nikula wrote:
    > >> > 2) Have the python extension read the ABI files directly, without an
    > >> > extra pipeline.
    > >>
    > >> He who writes the script, get's to dictate the language of the script :)
    >
    > The point is, it's an extension to a python based tool, written in perl,
    > using pipes for communication, and losing any advantages of integrating
    > with the tool it's extending.
    >
    > I doubt you'd want to see system() to be used to subsequently extend the
    > perl tool.
    >
    > I think it's just sad to see the documentation system slowly drift
    > further away from the ideals we had, and towards the old ways we worked
    > so hard to fix.

    Actually, it is a perl script that can be used standalone (just like
    get_maintainers.pl and kernel-doc) with have some features including
    producing a ReST output. We could easily get rid of the python extension,
    if we add this to the Makefile (adjusted to work with O= option):

    ./scripts/get_api.pl rest > Documentation/output/admin-guide/abi.rst

    >
    > > No idea about how much time it would take if written in python,
    > > but this perl script is really fast:
    > >
    > > $ time ./scripts/get_abi.pl search voltage_max >/dev/null
    > > real 0m0,139s
    > > user 0m0,132s
    > > sys 0m0,006s
    > >
    > > That's the time it takes here (SSD disks) to read all files under
    > > Documentation/ABI, parse them and seek for a string.
    > >
    > > That's about half of the time a python script takes to just import the
    > > the sphinx modules and print its version, running at the same machine:
    > >
    > > $ time sphinx-build --version >/dev/null
    > >
    > > real 0m0,224s
    > > user 0m0,199s
    > > sys 0m0,024s
    >
    > Please at least use fair and sensible comparisons. If you want to make
    > the extension usable standalone on the command-line, bypassing Sphinx,
    > you can do that. No need to factor in Sphinx to your comparisons.

    Yeah, I guess it should be possible to do that. How a python script
    can identify if it was called by Sphinx, or if it was called directly?

    Thanks,
    Mauro

    \
     
     \ /
      Last update: 2019-06-17 15:52    [W:2.067 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site