Re: [netmod] import-by-semver issue

"Rob Wilton (rwilton)" <rwilton@cisco.com> Sun, 24 March 2019 09:40 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 9487F130E79 for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 02:40:06 -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 iSz0u8DbFLHQ for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 02:40:04 -0700 (PDT)
Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 55C29130E7F for <netmod@ietf.org>; Sun, 24 Mar 2019 02:40:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=21120; q=dns/txt; s=iport; t=1553420403; x=1554630003; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=K7BBJQcC5hQboJaRgUgfmZFPR2zIvaTlngvcMhqfshk=; b=DNxHTaLLk9ksMaQMjIB7m0H3iIBThAkuwAxLa/1tKOJCDOeAyZo7TRdC copx2lHgL12qNpMt3sCs7Bmx7SYLMyKWoE++c/0ZR/GybPKesC6Bvx/pC +5a+mtcD/a5sYGyf561XzZGv995F5xK4OE86UTV+iy9iy4R78dNq+DAXA A=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BDAAAlUJdc/4ENJK1jGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBZYEPgQJogQMnCoQEkzuCDZo1DQEBI4RJAheEZSI4EgE?= =?us-ascii?q?BAwEBCQEDAm0cDIVKAQEBBCMKXAIBCBEEAQErAgICMB0IAgQBEggTgwiBEWQ?= =?us-ascii?q?Pq1CBL4Q0AoVpBYEvizIXgUA/hCM+gmEBAQIBhGiCVwOMcIQflAcJAodhi04?= =?us-ascii?q?hk36LHIYFjSUCERWBLjYhKIEucBWDJ4sMhT9BMY5wgR8BAQ?=
X-IronPort-AV: E=Sophos;i="5.60,256,1549929600"; d="scan'208,217";a="538929163"
Received: from alln-core-9.cisco.com ([173.36.13.129]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 24 Mar 2019 09:39:43 +0000
Received: from XCH-RCD-007.cisco.com (xch-rcd-007.cisco.com [173.37.102.17]) by alln-core-9.cisco.com (8.15.2/8.15.2) with ESMTPS id x2O9dhYs010118 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 24 Mar 2019 09:39:43 GMT
Received: from xch-rcd-007.cisco.com (173.37.102.17) by XCH-RCD-007.cisco.com (173.37.102.17) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 24 Mar 2019 04:39:42 -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 04:39:42 -0500
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Andy Bierman <andy@yumaworks.com>, NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] import-by-semver issue
Thread-Index: AQHU4arYjIn8/1YI30euxcwhgGMsT6YahbWg
Date: Sun, 24 Mar 2019 09:39:41 +0000
Message-ID: <892d5ab4649549698808a6150067f840@XCH-RCD-007.cisco.com>
References: <CABCOCHRQXwRM1_xNzwoWxdT6e_zSNSFpvooDDmP3g11gxd3NuA@mail.gmail.com>
In-Reply-To: <CABCOCHRQXwRM1_xNzwoWxdT6e_zSNSFpvooDDmP3g11gxd3NuA@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_892d5ab4649549698808a6150067f840XCHRCD007ciscocom_"
MIME-Version: 1.0
X-Outbound-SMTP-Client: 173.37.102.17, xch-rcd-007.cisco.com
X-Outbound-Node: alln-core-9.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/zfX7O-ctcgv9uyO01GocmQcelfg>
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 09:40:07 -0000

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.

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.

Thanks,
Rob


From: netmod <netmod-bounces@ietf.org> On Behalf Of Andy Bierman
Sent: 23 March 2019 19:01
To: NetMod WG <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