Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1386

Statement replicas do not trigger onStatementAdded()

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • 7.0.0, 7.0.9
    • 8.0.0, 7.0.10
    • parser
    • None

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: