Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate identifier "module-version" error with yanglint trying to parse [email protected] #2208

Open
jeremie6wind opened this issue Mar 25, 2024 · 1 comment
Labels
is:question Issue is actually a question.

Comments

@jeremie6wind
Copy link

Hello,
I got an error trying to parse new yang files.
Procedure to reproduce:

  1. I created a directory containing the yang files related to subscriptions, from Netopeer2/modules:
    [email protected] [email protected] [email protected]
    [email protected] [email protected] [email protected] [email protected] [email protected] [email protected].

  2. I added these yang drafts:
    [email protected] [email protected] [email protected]
    [email protected]
    [email protected]
    [email protected]

  3. Perform a yanglint(build from SHA: f4ba2ff):
    ./yanglint ~/sshfs_root/yang_env/[email protected]

I get this error :
libyang err : Duplicate identifier "module-version" of data definition/RPC/action/notification statement. (/ietf-yang-push-revision:{augment='/sn:subscriptions/sn:subscription/sn:target/yp:datastore/yp:selection-filter/yp:within-subscription'}/{uses='ypr:yang-push-module-version-config-list'}/ietf-yang-push-revision:module-version)

Basically it seems it is not possible to augment both:

augment "/sn:establish-subscription/sn:input/sn:target/sn:stream/sn:stream-filter/sn:within-subscription" {

augment "/sn:establish-subscription/sn:input/sn:target/yp:datastore/yp:selection-filter/yp:within-subscription" {

with the same grouping.

Same error with both:

augment "/sn:subscription-started/sn:target/sn:stream/sn:stream-filter/sn:within-subscription" {

augment "/sn:subscription-started/sn:target/yp:datastore/yp:selection-filter/yp:within-subscription" {

BR,
J

@michalvasko
Copy link
Member

I have improved the error message but I believe it is valid. Based on the new message and the RFC spec (second bullet at the top of the page). In practice, when parsing data, it would be impossible to distinguish between the two.

@michalvasko michalvasko added the is:question Issue is actually a question. label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:question Issue is actually a question.
Projects
None yet
Development

No branches or pull requests

2 participants