[YANGTOOLS-1044] Rework Uses statement ordering Created: 26/Nov/19 Updated: 18/Jan/24 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0, 13.0.2 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Our current implementation of uses statements relies on a rather ugly hack to ensure statements are resolved in definition order, for example in case of:
container foo {
uses bar;
uses baz;
}
grouping baz {
leaf baz {
type string;
}
}
grouping bar {
leaf bar {
type string;
}
}
As the two uses statements are resolved in reverse order, we end up:
Instead of this complicated tracking, we should be able to express a resolution dependency of 'uses baz' on 'uses bar', such that 'uses baz' is resolved only after 'uses bar' – which will naturally ensure that effectiveStatements are properly ordered. |
| Comments |
| Comment by Robert Varga [ 26/Nov/19 ] |
|
|