openconfig / goyang

YANG parser and compiler to produce Go language objects
Apache License 2.0
220 stars 84 forks source link

goyang complains augment not found #265

Open trentzhou opened 6 months ago

trentzhou commented 6 months ago

parent.yang:

module parent {
    namespace "urn:parent";
    prefix xxx;

    include child1;
    include child2;
}

child1.yang:

submodule child1 {
    belongs-to parent {
        prefix xxx;
    }

    container c1 {
    }

    augment /c1 {
        container c2 {
        }
    }
}

child2.yang:

submodule child2 {
    belongs-to parent {
        prefix xxx;
    }
    include child1;

    augment /xxx:c1/xxx:c2 {
        container c3 {
        }
    }
}

goyang fails:

$ goyang -p. parent.yang 
child2.yang:7:5: augment /xxx:c1/xxx:c2 not found

pyang can pass.