From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0275CA04DB; Fri, 16 Oct 2020 11:18:34 +0200 (CEST) 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