[YANGTOOLS-1039] Unable to refine anyxml node from imported model Created: 24/Nov/19  Updated: 18/Oct/20  Resolved: 18/Oct/20

Status: Resolved
Project: yangtools
Component/s: parser
Affects Version/s: 3.0.4
Fix Version/s: 6.0.0, 4.0.13, 5.0.7

Type: Bug Priority: Medium
Reporter: Richard Kosegi Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Given 2 yang models:

a.yang

module a {
    namespace "urn:opendaylight:a";
    prefix "a";
    revision 2019-11-24 {
        description "Initial revision";
    }
    grouping arg-path {
        anyxml path {
            description "ABC";
            mandatory true;
        }
    }
}

b.yang

module b {
    namespace "urn:opendaylight:b";
    prefix "b";    
    import a { prefix "a"; }
    revision 2019-11-24 {
        description "Initial revision";
    }
    
    rpc rpc1 {
        input {
            uses a:arg-path { refine path { mandatory false; } }
        }
    }
}

Second model can't be compiled:

 

[ERROR] Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:3.0.4:generate-sources (binding) on project jsonrpc-test-model: Failed to process reactor ProcessorModuleReactor{sources=[RevisionSourceIdentifier [name=test-model@2016-11-17], RevisionSourceIdentifier [name=test-model-op-only@2018-03-05], RevisionSourceIdentifier [name=b@2019-11-24], RevisionSourceIdentifier [name=a@2019-11-24]], parser=org.opendaylight.yangtools.yang.parser.impl.YangParserImpl@3bbf1c0d}: Failed to assemble sources: Some of EFFECTIVE_MODEL modifiers for statements were not resolved. Refine target node Relative{path=[(urn:opendaylight:b?revision=2019-11-24)path]} not found. [at test-model/src/main/yang/b.yang:14:30] -> [Help 1]

Interestingly, refine target node is found when grouping is from same YANG model.



 Comments   
Comment by Robert Varga [ 18/Oct/20 ]

yangtools-3.0.x is no longer supported and I cannot reproduce it on any supported streams. It probably got fixed as a side-effect of something else.

Generated at Wed Feb 07 20:55:00 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.