Hi Juergen,

> -----Original Message-----
> From: Juergen Schoenwaelder <[email protected]>
> Sent: 24 March 2019 15:31
> To: Rob Wilton (rwilton) <[email protected]>
> Cc: Andy Bierman <[email protected]>; NetMod WG <[email protected]>
> Subject: Re: [netmod] import-by-semver issue
> 
> On Sun, Mar 24, 2019 at 02:07:15PM +0000, Rob Wilton (rwilton) wrote:
> > 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.
> >
> 
> If two compilers (one supporting semver, the other not) resolve imports
> differently, then the design is in my view somewhat broken, in particular if 
> you
> allow NBC changes.

But that is true of YANG compilers today.  If there are multiple revisions of a 
module that could be chosen, then each compiler is at liberty to decide which 
revision to choose (last paragraph of section 5.1.1 in RFC 7950).

So, I would argue that "import-by-version" doesn't make YANG compilers any less 
consistent that they are already today, since that inconsistency already exists.

I presume that the real solution here is to explicitly define the full set of 
implemented, import-only-modules to the compiler so that it always compiles a 
consistent schema.  Perhaps other compilers have different ways to solve this 
problem.

Note, I also think that YANG library has a similar inconsistency.  I.e. there 
is no guarantee that two different compilers will construct exactly the same 
datastore schema from the YANG library output.  I think that this is a design 
bug, but also one that we attempt to address in 
draft-verdt-netmod-yang-semver-00.

Thanks,
Rob

> 
> /js
> 
> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to