Re: [netmod] IETF 108: Summary of insignificant whitespace changes and versioning

Ladislav Lhotka <ladislav.lhotka@nic.cz> Wed, 12 August 2020 07:42 UTC

Return-Path: <ladislav.lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 72B3D3A10F6 for <netmod@ietfa.amsl.com>; Wed, 12 Aug 2020 00:42:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EwU5XqIghW9n for <netmod@ietfa.amsl.com>; Wed, 12 Aug 2020 00:42:45 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 14A043A10EE for <netmod@ietf.org>; Wed, 12 Aug 2020 00:42:43 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id EADDF8600DA; Wed, 12 Aug 2020 09:32:10 +0200 (CEST)
Received: from localhost (unknown [195.113.220.110]) by trail.lhotka.name (Postfix) with ESMTPSA id E424186004C; Wed, 12 Aug 2020 09:32:07 +0200 (CEST)
From: Ladislav Lhotka <ladislav.lhotka@nic.cz>
To: Martin =?utf-8?Q?Bj=C3=B6rklund?= <mbj+ietf@4668.se>
Cc: jclarke=40cisco.com@dmarc.ietf.org, netmod@ietf.org
In-Reply-To: <20200811.170613.15308869624694470.id@4668.se>
References: <5CF24083-4126-4BE0-93F1-9A36F6DE9296@cisco.com> <19f17f7b-a48a-add0-351d-7a93e959dd7b@nic.cz> <20200811.170613.15308869624694470.id@4668.se>
Mail-Followup-To: Martin =?utf-8?Q?Bj=C3=B6rklund?= <mbj+ietf@4668.se>, jclarke=40cisco.com@dmarc.ietf.org, netmod@ietf.org
Date: Wed, 12 Aug 2020 09:42:39 +0200
Message-ID: <87bljgb98w.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/-pyU8MDrVViwmz6v0ltznce2GZE>
Subject: Re: [netmod] IETF 108: Summary of insignificant whitespace changes and versioning
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Aug 2020 07:42:48 -0000

Martin Björklund <mbj+ietf@4668.se> writes:

> Hi,
>
>
> Ladislav Lhotka <ladislav.lhotka@nic.cz> wrote:
>> 
>> 
>> On 11. 08. 20 15:41, Joe Clarke (jclarke) wrote:
>> > At the IETF 108 virtual meeting, Lada asked about what would happen if he converted a YANG module to YIN syntax (or vice versa, or to some other format).  This was during the discussion of the issue of what should happen if a module changes and the only changes are insignificant whitespaces (e.g., strip trailing spaces, change line length of descriptions, etc.).
>> > 
>> > The authors/contributors discussed on this on our weekly calls, and we propose:
>> > 
>> > If a module changes and those changes are only insignificant whitespace changes and the syntax of the module remains the same (i.e., YANG to YANG, YIN, YIN, etc.), a new revision of the module MUST be created.  If you are using YANG semver as your revision scheme, you MUST apply a PATCH version bump to that new module revision to indicate an editorial change.
>> > 
>> > The reasoning behind this decision is that it makes it very clear and unambiguous to consumers that this module has been consciously changed, and those changes are only editorial.  This way one won’t be concerned if they note that a module of a given syntax with the same version but different checksums and diffs wasn’t otherwise manipulated.
>> > 
>> > That said, if a module changes format from one syntax to another but maintains semantic equivalency, then the revision and YANG semver MUST be the same.  In that case, one will use the extension to realize that this module file cannot be directly compared to one of another syntax without looking at compiled or semantic representation.
>> 
>> The last paragraph means that after a round trip YANG -> YIN -> YANG the
>> initial and final YANG modules MUST have the same revision. However,
>> depending on the conversion tools used, they may easily differ in
>> whitespace, so their byte-oriented checksums won't be equal.
>> 
>> I think there are in fact three cases:
>> 
>> 1. Whitespace outside statement arguments - I believe this should never
>> be significant.
>
> Agreed.
>
>> 2. Whitespace in the argument of "contact", "description",
>> "error-message" and "organization" - this is tricky because tools may
>> format such arguments differently. I am leaning towards making
>> whitespace insignificant in this case as well.
>> 
>> 3. Whitespace in other arguments has to be significant and lead to a
>> revision bump.
>
> I think that any change in an argument string is an editorial change.
>
> For example, compare these two changes:
>
>    A1.  description "a server.";
>    A2.  description "A server.";
>
>    B1.  description "A  server.";
>    B2.  description "A server.";
>
> These are editorial changes, and thus the revision should be changed.

But consider

   description
       "A server and
        its data.";

versus

   description
       "A server and
       its data.";

Here the difference is only in presentation - a YANG parser gives the same string in both cases. Another awkward case is whitespace before a line break.

Lada

>
> Note however that the following change might look like an editorial
> whitespace change in the argument, but in fact it is not:
>
>   C1.
>       description
>           "A server and
>            its data.";
>
>   C2.
>       description
>         "A server and
>          its data.";
>
>
> /martin
>
>
>> 
>> And one more corner case for both 2 a 3: what if "\t" is replaced with
>> the tab character in a double-quoted string? For YANG, these two strings
>> are absolutely equivalent.
>> 
>> Lada
>> 
>> > 
>> > Thoughts?
>> > 
>> > Joe
>> > _______________________________________________
>> > netmod mailing list
>> > netmod@ietf.org
>> > https://www.ietf.org/mailman/listinfo/netmod
>> > 
>> 
>> -- 
>> Ladislav Lhotka
>> Head, CZ.NIC Labs
>> PGP Key ID: 0xB8F92B08A9F76C67
>> 
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka 
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67