Re: [netmod] import-by-semver issue

Andy Bierman <andy@yumaworks.com> Sun, 24 March 2019 11:07 UTC

Return-Path: <andy@yumaworks.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 425CB1310AE for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 04:07:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 HFknmmEGptQd for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 04:07:08 -0700 (PDT)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 80336130EFC for <netmod@ietf.org>; Sun, 24 Mar 2019 04:07:07 -0700 (PDT)
Received: by mail-lj1-x22a.google.com with SMTP id v22so5384991lje.9 for <netmod@ietf.org>; Sun, 24 Mar 2019 04:07:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bxo9PjkqVzC0nQjkOe2EsyepSufWd5vxei6EFdI+FpA=; b=Bp5j8Js0/O2xT6nodGJUUwST2Urd7/HJNVAo+f4zAbr8DGeAaWlr/woNW355vrTVkV 8BJjaAcmtz/R3YPhISFcYquxbCjFNlief7LhN+yJ/f9cY0ftngGQCgP1FyNFlcF/7oCC Q7CiPN4RTblI7N0Bc4ETZq6ek4JKJkCo4RXUcv4OajpaCRwcCy10/Km8Vz/CNbQ8JcGt RZjl5F8tCZ5pyPWgfQPj+F8uz9+zPGeqxnEGc1HqMCJ+g9dc6OrV+YolgU4SEFNTblrY Zha6rN7eaul6IPup/M/Ehsb8+S4w8Vb+4KSxAeXn4fZNM+qPD/3y+S+zkPxgKq0M1b48 M9BQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bxo9PjkqVzC0nQjkOe2EsyepSufWd5vxei6EFdI+FpA=; b=AFOY/dRpPvGMHQ4Mz3wmsEOx2iDF2bN/ilJavoYD4IVgGMcxmvBE7oeBmgOckkRGj/ BKKboutp3HwKsdhxVrKlCsUjKUf9ez3xTKrnZdDJ4SD11YU2NgM5d75ynvt8lYXyVvDs xCq6e4caliLh7bDtUCudh1U1XzA1YTUkH5Ocppbbh5U8wDxDzQSS2aiqR9ILpS4K+WbU AbtYrUhAA3peWrBk1cJ305QMLXwzRUJx962HRLXIGvT5LxoaCZP+NSZZT69lZ0z+kZoa 7pcIj9pCVQeRxCUsTrGl2I6mNZEFaUs/ZijZmV8Sesxuf7JIFyimyvwlJuQekgKOegq2 T4tQ==
X-Gm-Message-State: APjAAAV/FPf/2UQ8tksi9ttB+UvNOe8qBEUMfCCMkuSPmt6sVt8zMYnb VR3d4Cb5Kfknha2XoD3Heq8Hf3IMf2B7IpZeprJxBQ==
X-Google-Smtp-Source: APXvYqxM+wAF/TF4FVCAXgHRCGW4hA9eUHEoQO7F/jqe/b4xhGB1r1L6Rni/hM6QamHt4229OE/HlnIVtkzk6nDQhoA=
X-Received: by 2002:a2e:551d:: with SMTP id j29mr8159764ljb.180.1553425625492; Sun, 24 Mar 2019 04:07:05 -0700 (PDT)
MIME-Version: 1.0
References: <CABCOCHRQXwRM1_xNzwoWxdT6e_zSNSFpvooDDmP3g11gxd3NuA@mail.gmail.com> <892d5ab4649549698808a6150067f840@XCH-RCD-007.cisco.com>
In-Reply-To: <892d5ab4649549698808a6150067f840@XCH-RCD-007.cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Sun, 24 Mar 2019 04:06:54 -0700
Message-ID: <CABCOCHT3qfo4s7JV6WktWuz2C_UA6NFjqdVcjxVjxCDTUHWDzg@mail.gmail.com>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>
Cc: NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000097c4bb0584d516d9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Ds2tZWNPCQBZ1TgBsYnuRv5B7RM>
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 11:07:17 -0000

On Sun, Mar 24, 2019 at 2:40 AM Rob Wilton (rwilton) <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> *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
>
>
>