[YANGTOOLS-1386] Statement replicas do not trigger onStatementAdded() Created: 16/Dec/21  Updated: 18/Dec/21  Resolved: 18/Dec/21

Status: Resolved
Project: yangtools
Component/s: parser
Affects Version/s: 7.0.0, 7.0.9
Fix Version/s: 8.0.0, 7.0.10

Type: Bug Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Discovered during YANGTOOLS-1385 development, issuing a StmtContext.replicaAsChildOf() does not trigger StatementSupport.onStatementAdded().
This method was introduced in YANGTOOLS-1184 and related effort, but the behaviour has always been that the statements introduced in places which use replicaAsChildOf() did not trigger the codepath.

This is problematic, as statements introduced though this mechanism do not see the statement being instantiated in target context, and hence cannot perform statement-specific inference-based validation – like attempted in YANGTOOLS-1385, where an 'unique' statement can be introduced via 'deviate add' – and it should run validation in the target list context, not in its original declaration site.


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