From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4528C43457 for ; Fri, 16 Oct 2020 09:18:34 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4B9C220EDD for ; Fri, 16 Oct 2020 09:18:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B9C220EDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B709E1EBD9; Fri, 16 Oct 2020 11:18:28 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 5D83A1EBD8 for ; Fri, 16 Oct 2020 11:18:26 +0200 (CEST) IronPort-SDR: YpP5Bhh3P9Ph3PphbYkDEjE1Of9gMUD2Z5rb658PfR/tdcB/JuLgfmFdUjF0d1ouEBFJFbS9lU /TV+H/Ln3Zag== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="251261149" X-IronPort-AV: E=Sophos;i="5.77,382,1596524400"; d="scan'208";a="251261149" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2020 02:18:24 -0700 IronPort-SDR: v7xFMfs2AAU87Ozqr1PzJWG3FNQxCqxkotOEFsQN9tHn6m1qUC9VX6nR+BycrOmdirFpBW/Ty4 sHi7C0i/RFFA== X-IronPort-AV: E=Sophos;i="5.77,382,1596524400"; d="scan'208";a="531647858" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.54.208]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 16 Oct 2020 02:18:22 -0700 Date: Fri, 16 Oct 2020 10:18:18 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com Message-ID: <20201016091818.GC1008@bricha3-MOBL.ger.corp.intel.com> References: <20201016033955.2566518-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201016033955.2566518-1-thomas@monjalon.net> Subject: Re: [dpdk-dev] [PATCH] doc: make sphinx errors more visible X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Oct 16, 2020 at 05:39:55AM +0200, Thomas Monjalon wrote: > When running Sphinx through ninja, the wrapper configured in meson > redirects stdout to a log file. > It makes more important to print issues on stderr. > > Some warnings generated by the conf.py were hidden because > printed on stdout. The first improvement is to print them on stderr. > > The second measure is to stop processing if meson was configured > with --werror. > > Signed-off-by: Thomas Monjalon > --- > buildtools/call-sphinx-build.py | 3 +++ > doc/guides/conf.py | 19 +++++++++++++++---- > 2 files changed, 18 insertions(+), 4 deletions(-) > > diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py > index 26b199220a..8b266bec9b 100755 > --- a/buildtools/call-sphinx-build.py > +++ b/buildtools/call-sphinx-build.py > @@ -14,6 +14,9 @@ > > # set the version in environment for sphinx to pick up > os.environ['DPDK_VERSION'] = version > +# forward error policy to conf.py > +if '-W' in extra_args: > + os.environ['SPHINX_STOP_ON_ERROR'] = 'true' > Actually, I'm not sure this is necessary. Since the conf.py is processed from within the sphinx process itself, you can access sys.argv directly from within conf.py, rather than having to pass variables through the environment. /Bruce