[YANGTOOLS-1340] Parser does not emit all events for extension statements Created: 01/Oct/21  Updated: 07/Jun/22

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

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


 Description   

This was detected during development of YANGTOOLS-1338. EffectiveStatementSupport objects registered for the FULL_DECLARATION phase do not see the full lifecycle of their corresponding statement.

They see onStatementAdded() first and then onFullDefinitionDeclared(), but not onStatementDefinitionDeclared() or any other of the intermediate callbacks.

This is understandable from how the reactor operates, but it is not documented anywhere and the integration surface does not provide any guidance which would steer implementers – all they see is their method not invoked.

We need to document this somewhere at the very least, but should also explore what we can do to at least warn of this caveat, if not actively prevent it from being possible.



 Comments   
Comment by Robert Varga [ 01/Oct/21 ]

This is possible because there is no API-level construct which would restrict the methods available to statement support based on its intended phase.

I am not sure how feasible is it to create such a coupling construct.

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