Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4184753imm; Mon, 14 May 2018 04:01:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrn87fB0ydnfp9HswZmqPECvpMF5acbBvX+mxqvzZzi/MNiEBrlLeJSfZjOvM9oVLilY7kL X-Received: by 2002:a65:4502:: with SMTP id n2-v6mr7874320pgq.95.1526295703404; Mon, 14 May 2018 04:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526295703; cv=none; d=google.com; s=arc-20160816; b=J49ycqfY+ZF//4k2hTLhfmWwCJ2vW3xC0C7RfMCHVaI2Dqyhk2AakxohHBheFvgPjs 4Y3VkPisFoKHaCm21Ow9DqCEpDnLGBxtdyyRgyrjGwhf6Y+M7ItrizaijAf4JFcYfkLT NlWfqwB5HQo3MDA7LD6HS93L6PhKNBYloogpbm2y4QRJISD5yr47JmSFMaWhzP8MKYi/ Lq5jRiwUn/mNtK2JlBGD/TYMSl/vR2x28Rn0svBK+J6vqWnal9rg81UD9DfP4X7exIqE 8CbB8a8xcS4lVECisSFT4j5/v3Iyf0M4N1h/tts7B6T2eEOth1DDwpE6ARHXpEpj5HVU sFaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=ayGuQAyQYB89F8OzG1fF7dnGoWNZ5mzprjylPmq4+1U=; b=pXs1JXktMkClapn9ntXMCe1a3pPlWFNCqAI2H2VWlrWnm4QNpobc1c3adNLTMyKMM7 tUTk4kS8zNoq/EFKdznXfQxWnDmp3jMlXGPH+N1EyaPU/mrM6Ji5kCv5PaRxyYR7mdmf RbuOI06LyOiBBh4huqgPFi/qn+dn2TaBogpDDXl5Es0hGJqLxVDJ+t3Y9rCtq72NWBSh S1AIveKGKo/GKjObhgW2qVLJSP3/ke2slCvP0alrpVU43cIynlS/mYLySuRXAGS5lJ3w r9spzn30iDvCW799GFZfjz4BCEHlDvalfco5vSb09Qb0zcn3MazoS605x853o27WhjGh 9lWw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4-v6si8721310plp.130.2018.05.14.04.01.27; Mon, 14 May 2018 04:01:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbeENLBC (ORCPT + 99 others); Mon, 14 May 2018 07:01:02 -0400 Received: from mga17.intel.com ([192.55.52.151]:35893 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbeENLBB (ORCPT ); Mon, 14 May 2018 07:01:01 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 04:00:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="54989652" Received: from jnikula-mobl2.fi.intel.com (HELO localhost) ([10.237.72.62]) by fmsmga001.fm.intel.com with ESMTP; 14 May 2018 04:00:56 -0700 From: Jani Nikula To: Jonathan Corbet , Matthew Wilcox Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Christoph Hellwig , Linux Doc Mailing List , linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra Subject: Re: [RFC PATCH 1/2] scripts/kernel-doc: Auto-detect common code-blocks In-Reply-To: <20180510105105.5cb0d54f@lwn.net> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <2ac6e3da22119f714406925139e40f4d835d11a4.1525962971.git.mchehab+samsung@kernel.org> <20180510163456.GC30442@bombadil.infradead.org> <20180510105105.5cb0d54f@lwn.net> Date: Mon, 14 May 2018 14:03:33 +0300 Message-ID: <87in7q33ei.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 May 2018, Jonathan Corbet wrote: > On Thu, 10 May 2018 09:34:56 -0700 > Matthew Wilcox wrote: > >> I think this is a bit fragile. Why not just search for ':\n'? Is >> there ever a case where we want to write: >> >> /** >> * foo is a bar: >> * wibble >> */ >> and have wibble not be a code-block? > > Yeah, we might want to write something like: > > - Leading off a bulleted list > > 1) or a numbered list > > for example. That's why I was thinking of looking for explicit markers > for such lists. > > It'll take some playing around with to have a hope of getting right, > methinks. We had serious trouble with the old DocBook toolchain because the tool pipeline was so long, and each step had its own expectations and quirks. For example, remember the escaping needed for xml in kernel-doc? Or tmpl xml files being invalid xml because of the docproc directives? One of the big benefits of the current toolchain is minimizing the amount of special casing magic required. The more we add custom syntax sugar in kernel-doc, the more we run the risk of running into hard problems later on in the Sphinx phase. For example, our own syntax preventing the use of legitimate rst syntax. And now we get somewhat reasonable error messages from Sphinx when things go wrong; we didn't get that when the impedance mismatches caused issues with the old toolchain. They were hard to debug and mostly nobody even bothered. We should work to reduce the amount of special processing in kernel-doc, not the other way round. The use of "::" is a valid and arguably rather non-invasive rst token for indicating the following indented block is a literal block. Adding heuristics (especially ones based on English language magic words) will lead to bigger problems than it's trying to solve. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center