Do not use DerivableSchemaNode
Description
blocks
is duplicated by
relates to
Activity
Show:
Robert Varga December 5, 2021 at 3:34 PM
Analyzing the various accesses to BindingRutimeContext and its underlying BindingRuntimeTypes sheds a bit of light on this.
So far it seems that BindingRuntimeTypes really wants to be a tree of RuntimeType instances, each of which provides lookup mechanism by Type and by schema tree (and/or perhaps data tree?) QNames to find child definitions. We already have grouping/augment dependencies available, all we need is to cross-reference them to design the appropriate lookup tables – which is exactly what AbstractExplicitGenerator.getOriginal() is supposed to provide.
Done
Details
Details
Assignee
Robert Varga
Robert VargaReporter
Robert Varga
Robert VargaLabels
Components
Fix versions
Priority
Created October 15, 2021 at 6:25 PM
Updated February 6, 2025 at 2:12 PM
Resolved March 8, 2022 at 3:59 PM
DerivableSchemaNode.getOriginal() is used by mdsal-binding-runtime-api and mdsal-binding-generator to resolve original statement backwards along the instantiation axis.
Since BindingRuntimeContext is driven by state from GeneratorReactor and that has the capacity to resolve statement -> generator relationships without DerivableSchemaNode (as demonstrated by MDSAL-694), we should be able to do our job there without relying on YANG parser giving us these hints.
Analyze the code and its intent and remodel it so that callers of BindingRuntimeContext.originalNodeOf() have everything they need to operate reasonably efficiently (based, again, on their callsites which should be mostly in mdsal-binding-dom-codec).
Exactly how GeneratorReactor achieves is not quite clear yet, but it probably be similar to what MDSAL-695 ends up doing.