Re: [netmod] import-by-semver issue

"Rob Wilton (rwilton)" <rwilton@cisco.com> Sun, 24 March 2019 14:07 UTC

Return-Path: <rwilton@cisco.com>
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 395D512788C for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 07:07:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 cxfG2twZeQha for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 07:07:18 -0700 (PDT)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7B88912426E for <netmod@ietf.org>; Sun, 24 Mar 2019 07:07:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=30210; q=dns/txt; s=iport; t=1553436438; x=1554646038; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=WEo+2IWsZngl0VwwoCMQ/t1t286NoEpYt7qdjpyW35o=; b=MjV/f1ZX16197vyhuOUU7nxMWlXWHmpAbijf6SVZZIfN3ZQtvf81wfQ4 aJPR7DQlYksxAbfhhCDuhQ9PgP+XE6gbls+dvVLPikTuiemfl7PKCaX7l i/7VD1e7XOGRnsyORYZX1qwW/zpyvmCH1P3HavRkyxeTee6a1HlM8BOwU 0=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0APAACMjpdc/4YNJK1jGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBVAEBAQEBAQsBgQ6BAmiBAycKhASVSJo1DQEBI4RJAhe?= =?us-ascii?q?EZSI3Bg0BAQMBAQkBAwJtHAyFSgEBAQQjCkwQAgEIEQQBASEHAwICAjAUCQg?= =?us-ascii?q?CBA4FCBODCIERZA+sIoEvhDQChWkFgS8BizEXgUA/hCM+gmEBAQIBghSCVIJ?= =?us-ascii?q?XA4xwhB+UBwkCh2GLTiGTfpEhjSUCERWBLjUiKIEucBWDJ4sMhT9BMY50gR8?= =?us-ascii?q?BAQ?=
X-IronPort-AV: E=Sophos;i="5.60,256,1549929600"; d="scan'208,217";a="249629734"
Received: from alln-core-12.cisco.com ([173.36.13.134]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 24 Mar 2019 14:07:16 +0000
Received: from XCH-ALN-007.cisco.com (xch-aln-007.cisco.com [173.36.7.17]) by alln-core-12.cisco.com (8.15.2/8.15.2) with ESMTPS id x2OE7GmY009454 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 24 Mar 2019 14:07:16 GMT
Received: from xch-rcd-007.cisco.com (173.37.102.17) by XCH-ALN-007.cisco.com (173.36.7.17) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 24 Mar 2019 09:07:16 -0500
Received: from xch-rcd-007.cisco.com ([173.37.102.17]) by XCH-RCD-007.cisco.com ([173.37.102.17]) with mapi id 15.00.1473.003; Sun, 24 Mar 2019 09:07:15 -0500
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Andy Bierman <andy@yumaworks.com>
CC: NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] import-by-semver issue
Thread-Index: AQHU4arYjIn8/1YI30euxcwhgGMsT6YahbWggABuJwD//9uzgA==
Date: Sun, 24 Mar 2019 14:07:15 +0000
Message-ID: <4c0a8dca338f4ca384dea933f046511e@XCH-RCD-007.cisco.com>
References: <CABCOCHRQXwRM1_xNzwoWxdT6e_zSNSFpvooDDmP3g11gxd3NuA@mail.gmail.com> <892d5ab4649549698808a6150067f840@XCH-RCD-007.cisco.com> <CABCOCHT3qfo4s7JV6WktWuz2C_UA6NFjqdVcjxVjxCDTUHWDzg@mail.gmail.com>
In-Reply-To: <CABCOCHT3qfo4s7JV6WktWuz2C_UA6NFjqdVcjxVjxCDTUHWDzg@mail.gmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.61.79.96]
Content-Type: multipart/alternative; boundary="_000_4c0a8dca338f4ca384dea933f046511eXCHRCD007ciscocom_"
MIME-Version: 1.0
X-Outbound-SMTP-Client: 173.36.7.17, xch-aln-007.cisco.com
X-Outbound-Node: alln-core-12.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/I_SBzY2kyoSVC_lfRE4qTbZy6S8>
Subject: Re: [netmod] import-by-semver issue
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: Sun, 24 Mar 2019 14:07:21 -0000

Hi Andy,

There are many ways to write and design compilers.

Compilers that don’t understand import-by-semver just ignore the extension, no deviation is required.  They just import whichever arbitrary revision that they would have imported anyway, as specified by YANG 1.1.  The import-by-semver statement just reduces the set of valid modules revisions that can be used for import.

Thanks,
Rob


From: Andy Bierman <andy@yumaworks.com>
Sent: 24 March 2019 12:07
To: Rob Wilton (rwilton) <rwilton@cisco.com>
Cc: NetMod WG <netmod@ietf.org>
Subject: Re: [netmod] import-by-semver issue



On Sun, Mar 24, 2019 at 2:40 AM Rob Wilton (rwilton) <rwilton@cisco.com<mailto:rwilton@cisco.com>> wrote:
Hi Andy,

Yes we are currently implementing the module version field, although that may change depending on what different the final solution ends up being.

Support for import-by-version is less critical for us, and hence implementation would lag.

In terms of the issue that you raise:

-        I would expect that a compiler that understands semver to preload the semver extension, possibly allow with other common YANG type files, extensions).

-        For a compile that doesn’t understand semver then it would just ignore the extension, which should be fine.


Try to find even 1 compiler in the world that works this way.
Yes you can specially hack the extension implementation as if it were a built-in keyword.

I agree that it would be nice if this extension was part of the core YANG language, but I don’t think that is necessarily required.


I don't think any of semver is required for anything.
IMO it provides a minor improvement to  people familiar with the MAJOR.MINOR.PATCH numbering.
This improvement is lost as soon as extra letters are added and the string is no longer familiar.

Import-by-semver seems like it is part of the base module (no if-feature on the extension-stmt is even possible)
so skipping the implementation of it needs a deviation (oh wait, YANG 1.1 can't do that either).


Thanks,
Rob

Andy



From: netmod <netmod-bounces@ietf.org<mailto:netmod-bounces@ietf.org>> On Behalf Of Andy Bierman
Sent: 23 March 2019 19:01
To: NetMod WG <netmod@ietf.org<mailto:netmod@ietf.org>>
Subject: [netmod] import-by-semver issue

Hi,

I am wondering if there are implementations of this draft:

https://tools.ietf.org/html/draft-verdt-netmod-yang-semver-00


Specifically, implementation of the  'version' extension

https://tools.ietf.org/html/draft-verdt-netmod-yang-semver-00#section-3


IMO it is a really bad idea to put the semantics of how to import modules
in one of the modules that is imported.  Your example shows ietf-semver
imported first with no extension, but it could be last with a version extension.

          // all other imports, then last....


    import ietf-semver {

      prefix "semver";

      semver:version 1.1.2;

    }

Translation unit parsing is something that needs to be built into the compiler.
This should be part of YANG 1.2 if it is done.



  import example-module {

     prefix exmod;

     version 1.2.0+;

   }


To a compiler writer, the difference is huge. (ietf-semver extensions need to
be built-in statements in YANG, at least 'version')


BTW, all the import examples are missing the mandatory prefix-stmt


Andy