Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B657CC4167B for ; Wed, 6 Dec 2023 11:19:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.649120.1013497 (Exim 4.92) (envelope-from ) id 1rApwE-0005jm-QM; Wed, 06 Dec 2023 11:19:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 649120.1013497; Wed, 06 Dec 2023 11:19:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rApwE-0005jf-Nf; Wed, 06 Dec 2023 11:19:34 +0000 Received: by outflank-mailman (input) for mailman id 649120; Wed, 06 Dec 2023 11:19:34 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rApwE-0005jZ-Cr for xen-devel@lists.xenproject.org; Wed, 06 Dec 2023 11:19:34 +0000 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [2a00:1450:4864:20::332]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 541db6ff-9429-11ee-9b0f-b553b5be7939; Wed, 06 Dec 2023 12:19:32 +0100 (CET) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40c05ce04a8so47077135e9.0 for ; Wed, 06 Dec 2023 03:19:32 -0800 (PST) Received: from [10.80.67.30] (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id r21-20020a05600c35d500b0040b3e79bad3sm21573943wmq.40.2023.12.06.03.19.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Dec 2023 03:19:31 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 541db6ff-9429-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1701861571; x=1702466371; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=1FEUV+PmKBOeyVDMK5RQ80NkiszK43YJzMpajTgF0JU=; b=IbybqLs/DAbsR2sUqjZw0luxLGPGOcEbIHs2vCShbUsbJM5FIsZdnwpyFuHZwA33Ym 2OBCcBB2AWvJvtQbLTzU1lLBfo3UuOWvl7JV2OuftuTk8VBtVmFRifa+YbRMQc3Cn2Lv 47e867uInFON/x01cglidN5nZPSiKnCT3t/Wc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701861571; x=1702466371; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1FEUV+PmKBOeyVDMK5RQ80NkiszK43YJzMpajTgF0JU=; b=pVaivsCskzpcA/SDDzwBXrDSlAN+O/+8ICGfJr4BbaZcD4TUEG1bBbaKFyAzUKEGYS qTmh5PZTx6SvStXXgLMhlRtnwa6kn2ASxCYu2ZpPA0nEWL0I0OPDML8RiYrc4x66SpH3 Q5LevAkUAtzAqjtWfi/bsjx/6rL07kEMMBUBaoC3EAdPYjuc7Lk1v2lhwIfL8Mnu7aqr jGc4Vt+GEw3QI/RhdmV3SCT+ZmAgpAnyRc21SmUl2N3GYsIw8R4Xub3GwaQb10et8Zg5 od1mG+igQm/E3zhg0pN6M6sYLOANhg3f9v4qiwOdGU7QS7QPtsh610uw2DkzH/Omlt4n SYvA== X-Gm-Message-State: AOJu0Yz9ETgC5CLyY67x517JneJSPiSegq/yv7FAbnHYvF3hpXsW0WpU 3A7zAgDFaeoA0BBR1Y6wKKN4Ig== X-Google-Smtp-Source: AGHT+IET00eT+qOGrLf1wmJr9VnNb5nAP2BUr4CUfncqfgizZ9e0u83c5EZbhYBvn2QsTFNAQkTwhA== X-Received: by 2002:a05:600c:2210:b0:40b:5f03:b3fc with SMTP id z16-20020a05600c221000b0040b5f03b3fcmr274540wml.286.1701861571531; Wed, 06 Dec 2023 03:19:31 -0800 (PST) Message-ID: <6f071eba-3995-451b-af80-efe875ec5ea8@citrix.com> Date: Wed, 6 Dec 2023 11:19:30 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] CODING_STYLE: Add a section of the naming convention Content-Language: en-GB To: Jan Beulich , George Dunlap Cc: xen-devel@lists.xenproject.org, Julien Grall , Stefano Stabellini , Wei Liu , Julien Grall References: <20231205181218.74667-1-julien@xen.org> <50b36423-d1e1-406f-a63f-66f2e4dce68e@suse.com> From: Andrew Cooper Autocrypt: addr=andrew.cooper3@citrix.com; keydata= xsFNBFLhNn8BEADVhE+Hb8i0GV6mihnnr/uiQQdPF8kUoFzCOPXkf7jQ5sLYeJa0cQi6Penp VtiFYznTairnVsN5J+ujSTIb+OlMSJUWV4opS7WVNnxHbFTPYZVQ3erv7NKc2iVizCRZ2Kxn srM1oPXWRic8BIAdYOKOloF2300SL/bIpeD+x7h3w9B/qez7nOin5NzkxgFoaUeIal12pXSR Q354FKFoy6Vh96gc4VRqte3jw8mPuJQpfws+Pb+swvSf/i1q1+1I4jsRQQh2m6OTADHIqg2E ofTYAEh7R5HfPx0EXoEDMdRjOeKn8+vvkAwhviWXTHlG3R1QkbE5M/oywnZ83udJmi+lxjJ5 YhQ5IzomvJ16H0Bq+TLyVLO/VRksp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Bh24PQ9gaLJvfPKpNzGD8XWR5HHF0NLIJhgg 4ZlEXQ2fVp3XrtocHqhu4UZR4koCijgB8sB7Tb0GCpwK+C4UePdFLfhKyRdSXuvY3AHJd4CP 4JzW0Bzq/WXY3XMOzUTYApGQpnUpdOmuQSfpV9MQO+/jo7r6yPbxT7CwRS5dcQPzUiuHLK9i nvjREdh84qycnx0/6dDroYhp0DFv4udxuAvt1h4wGwTPRQZerSm4xaYegEFusyhbZrI0U9tJ B8WrhBLXDiYlyJT6zOV2yZFuW47VrLsjYnHwn27hmxTC/7tvG3euCklmkn9Sl9IAKFu29RSo d5bD8kMSCYsTqtTfT6W4A3qHGvIDta3ptLYpIAOD2sY3GYq2nf3Bbzx81wZK14JdDDHUX2Rs 6+ahAA== In-Reply-To: <50b36423-d1e1-406f-a63f-66f2e4dce68e@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 06/12/2023 8:41 am, Jan Beulich wrote: > On 06.12.2023 03:21, George Dunlap wrote: >> On Tue, Dec 5, 2023 at 6:12 PM Julien Grall wrote: >>> From: Julien Grall >>> >>> Several maintainers have expressed a stronger preference >>> to use '-' when in filename and option that contains multiple >>> words. >>> >>> So document it in CODING_STYLE. >>> >>> Signed-off-by: Julien Grall >>> >>> --- >>> Changes in v2: >>> - New wording >>> - Update the section title >>> - Add Jan's acked-by >>> --- >>> CODING_STYLE | 9 +++++++++ >>> 1 file changed, 9 insertions(+) >>> >>> diff --git a/CODING_STYLE b/CODING_STYLE >>> index ced3ade5a6fb..ed13ee2b664b 100644 >>> --- a/CODING_STYLE >>> +++ b/CODING_STYLE >>> @@ -144,6 +144,15 @@ separate lines and each line should begin with a leading '*'. >>> * Note beginning and end markers on separate lines and leading '*'. >>> */ >>> >>> +Naming convention for files and command line options >>> +---------------------------------------------------- >>> + >>> +'-' should be used to separate words in commandline options and filenames. >>> +E.g. timer-works. >>> + >>> +Note that some of the options and filenames are using '_'. This is now >>> +deprecated. >> Sorry for not catching this last time; "are using X" isn't really >> idiomatic English; more idiomatic would be something like the >> following: >> >> "Note that some existing options and file names use '_'. This is now >> deprecated." >> >> Since we're changing things, I *think* most style guides would advise >> against starting the sentence with a punctuation; so perhaps: >> >> "Command-line options and file names should use '-' to separate words; >> e.g., timer-works." >> >> And what about adding to the last paragraph: >> >> "When touching code around command-line parameters still using '_', it >> is recommended to modify the documentation to say only '-', but modify >> the code to accept both '-' and '_' (for backwards compatibility)." > In this context see > https://lists.xen.org/archives/html/xen-devel/2020-01/msg01945.html > and Andrew's response > https://lists.xen.org/archives/html/xen-devel/2020-01/msg02006.html > I'm still in favor of addressing the issue centrally (making unnecessary > adjustments like you suggest in the new paragraph). Yet I think Andrew's > objection would cover such adjustments as much as my generic solution. Aliasing - and _ in the cmdline parsing breaks basic usability. Its fine for new options to use -, and it's even fine-ish (but only if you're going to be the one doing security backports) to rename internal files. But there is real and detrimental effect for altering the command line. You will get people failing to express the option they intended when working with an older form of Xen.  You will need an absurd number of notes in the command line docs saying "newer versions of Xen accept an alias but you need to use the underscore form for backwards compatibility". Not to mention that there are years of notes scattered all around the internet using the underscore forms, so it's likely that everyone will continue to use the underscore form, meaning that you don't even have a way to phase them out. And for what?  An attempt to pretend that we don't have 2 decades of history where underscores where the norm? It's tinkering, for no useful benefit and a clear cost. ~Andrew