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 <[email protected]> On Behalf Of Andy Bierman
Sent: 23 March 2019 19:01
To: NetMod WG <[email protected]>
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

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to