Eliminate duplicate DescriptionEffectiveStatementImpl objects (YANGTOOLS-694)

[YANGTOOLS-743] Eliminate use of StatementContextBase from parser.spi.meta classes Created: 08/Feb/17  Updated: 10/Apr/22  Resolved: 13/Oct/17

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Sub-task
Reporter: Igor Foltin Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Relates
relates to YANGTOOLS-1382 Hide StatementContextBase Resolved

 Description   

Prerequisite.get() is used across several yang-parser-impl classes which utilize InferenceAction. In some places, the returned StmtContext needs to be downcasted to StatementContextBase in order to perform necessary operations with it later.
It would be nice if the Prerequisite.get() method returned StatementContextBase right away so that we would not need to do the downcasting.



 Comments   
Comment by Robert Varga [ 07/Jun/17 ]

I am not sure about the direction here. StatementContextBase is an implementation thing, we already have most operations executing on StmtContext

{.Mutable}

. We need to list out the operations executed on StatementContextBase and re-evaluate them in terms of inclusion into parser.spi.meta.

The reason for this is very simple: parser.spi.meta is the interface spec, parser.stmt.reactor is the implementation (BuildGlobalContext is a NamespaceBehaviour.Registry). Hence there should be no dependencies going from spi to reactor – which is the case of StatementContextBase.

This is important when addressing YANGTOOLS-694 as we need to have StmtContext.Mutable implementation without all the weight of StatementContextBase.

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