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

Refactor yang-parser-rfc7950 and its extension wiring

    XMLWordPrintable

Details

    • Epic
    • Status: Confirmed
    • Medium
    • Resolution: Unresolved
    • None
    • 14.0.0
    • parser
    • None
    • Componentize YANG Parser

    Description

      After we have turned yang-parser-rfc7950 into a JPMS module, it is clear that our split of things is not quite up to par with what we really want.

      Most notably the interplay with extensions is problematic, especially with semantic extensions being implemented in default parser.

      For example openconfig extensions for semver and pattern interact with core YANG concepts and 'pattern' statement. The implementation of those currently reside in yang-parser-rfc7950.

      In a perfect world each statement implementation would sit in a separate JPMS module. Interactions between them and 'YANG core' would include no intimate information and the core would be injected with all what is needed. For that second part, we have static wiring, which shows it is (mostly) possible.

      I think we have a lot of what we need to exchange in terms of activation is org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupportBundle, so while an outright fragmentation to 80 bundles is a bad idea, we want start with refactoring parser.impl.DefaultReactors.addExtensions() into a step that rfc7950.reactor.RFC7950Reactors can execute through DI, which under JPMS means ServiceLoader.load() of its dependencies.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated: