[YANGTOOLS-1197] Release GroupingNamespace when module/submodule is done Created: 04/Dec/20  Updated: 05/Dec/20  Resolved: 05/Dec/20

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

Type: Improvement Priority: High
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from YANGTOOLS-1184 Release InferredStatementContext's ef... Resolved
Epic Link: Parser Performance

 Description   

We currently do not wipe GroupingNamespace because it is used after inference by UsesStatementSupport.getSourceGrouping().

Logic in UsesStatementSupport needs to be updated to store a StmtContext.replicaAsChildOf() for its context and add it to a dedicated namespace in that statement. During UsesStatementSupport.createEffective() we need to pick this replica up and use it as the source of the effective statement.

This way we do not look into GroupingNamespace after inference, have the grouping tied down with a proper reference, which will be cleared when we build the statement.

Once this is done, add GroupingNamespace to RootStatementContext.SWEPT_NAMESPACES.


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