Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2558129ybi; Mon, 17 Jun 2019 06:52:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1rN7prLfDg+r3rcoX5NxZ5zMLR+qEPuf5K+M+b3AfSXsuC2xCvezpzJztAQyu/XBq7DKY X-Received: by 2002:a63:c14c:: with SMTP id p12mr19208754pgi.138.1560779569679; Mon, 17 Jun 2019 06:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560779569; cv=none; d=google.com; s=arc-20160816; b=Tjs2CTUyqTPKSiZfhxLLWIv/0msf6IWR0RDSspmZ+GfRCqmJKIJEjrWD/KgksDZC0T I9kf5dCDAKOpBusXvVxb+Nu74LiqhyVLgYDl+MTvlmC2bgjJDzFYyQQEcZDfHEqqsxY4 EXXhGr2UBJuKYEfORi5B++oRXpKlNSI84b9zTLlUhVvGNZ/U3IFMEjrM4K3hMDRoGnhp U1Qk5WlLXTKc79v8tgv4F8o/IFXg6XYHaPjf1dk4BK6yTFvRZN3a75LHne1mcIHEJXJl gT4GivD6mHT8OX8sHmPs3Vhqj2z+67FYVI8Gulrxrn8Bh3r1T75FYaE6pUJ4SV9pGyoC flNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rqoIj6ukwJM6l56EUxxnRITr+tibvaPKGHXeg6stNSw=; b=YX+8mZAYKEWotOPjy3fuIzT7tMPvhSFjvTAFYdsd3JRf0KpV2oZ+jr91Kxvgt8DvDn TdbdaLIhdCHWpXZGKc9jDkKt4xQP61EAHnSmicz84/LEmZ/Qh+D//t/KzCeyRMkP2YqR 5y4F87KrICKybyZhUvOclh/24rk/5aMb8oOTzDWQToG4jg+EFOu4xCd67rncbBN01IsQ C2M5bnE267lBwAflmg6/GGGQEmuqtSIycSp9pdNccUxe97ZszWlSqwA9p6ac3EiSZj2J r+80OSgZzJDKalWIed3qADOnKvBMD+LBg9Rbmd8t+Kg26pLDoqE69VHkpTO4hYL+DQ7M e8Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=qfKX0T9v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si11543704pfq.70.2019.06.17.06.52.32; Mon, 17 Jun 2019 06:52:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=qfKX0T9v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727707AbfFQNwD (ORCPT + 99 others); Mon, 17 Jun 2019 09:52:03 -0400 Received: from casper.infradead.org ([85.118.1.10]:50732 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfFQNwD (ORCPT ); Mon, 17 Jun 2019 09:52:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rqoIj6ukwJM6l56EUxxnRITr+tibvaPKGHXeg6stNSw=; b=qfKX0T9vD3Jr2Jtfa1cJHW1EdS jxjCFwsVgdI0mcoZG1NtKye1fbR6u76zbwjRB3lbVSwAaC5US5sdheGAvCCvYO7D/iOA2PeTGV1n9 dYtZtKcJAaQT1fAaLiNONQflP5GZ+6HlIGKvncFnGApIQc3M2l06bQZuLjvmu19Im60Un2pvMJmWD HksolIGmjABbfAiPYma6XBr/Xy1hGa00Swn2hb/DDSVJ+ejmzfQRsU5HRCw+LnoNqs4c/O2iavTDk cDulxLWgxwY7N9GoMzR1PMFp4K8qIX14bsMfEwTFfZCKu4jylrg6lNIVHtGzfs7HwMWWh6JvvAT0R /qE3lOmw==; Received: from 179.186.105.91.dynamic.adsl.gvt.net.br ([179.186.105.91] helo=coco.lan) by casper.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hcs3E-0002ed-FW; Mon, 17 Jun 2019 13:52:01 +0000 Date: Mon, 17 Jun 2019 10:51:54 -0300 From: Mauro Carvalho Chehab To: Jani Nikula Cc: Greg Kroah-Hartman , Linux Doc Mailing List , Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: Re: [PATCH 12/14] doc-rst: add ABI documentation to the admin-guide book Message-ID: <20190617105154.3874fd89@coco.lan> In-Reply-To: <874l4ov16m.fsf@intel.com> References: <9da2a7f6ff57d9d53dcbb964eb310f7956522870.1560477540.git.mchehab+samsung@kernel.org> <87o930uvur.fsf@intel.com> <20190614140603.GB7234@kroah.com> <20190614122755.1c7b4898@coco.lan> <874l4ov16m.fsf@intel.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, 17 Jun 2019 15:36:17 +0300 Jani Nikula escreveu: > On Fri, 14 Jun 2019, Mauro Carvalho Chehab wrote: > > Em Fri, 14 Jun 2019 16:06:03 +0200 > > Greg Kroah-Hartman 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