Defer statement initialization in InferredStatementContext
(YANGTOOLS-784)
|
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.1, 5.0.8 |
| Type: | Sub-task | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Miroslav Kovac |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We currently use generic method of discovery for isConfiguration(), which means searching all effective statements. This forces materialization of those substatements, which we do not need. If substatements have been materialized, we should fall back to searching them, but if they were not, we should check parent and and prototype – and make sense of that directly. This may require a bit of work as we are dealing with completely different assumptions than current utilities handle. |
| Comments |
| Comment by Robert Varga [ 29/Oct/20 ] |
|
This probably requires
interface StmtContext { Optional<Boolean> explicitConfig() } which will be independent of parent, asking the question 'do you (transitively) have a child which produces ConfigurationEffectiveStatement and if so, what argument does it have? Let's add it as a @Beta method and see how it goes.
|