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

Some imports are not exposed in Module.getImports

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 6491
    • Low

    Description

      If you have:

      module A {
      namespace ...;
      prefix A;
      // without revision element
      ...
      }

      module B {
      namespace ...;
      prefix B;
      import A

      { prefix A; }

      // also without revision-date
      ...
      }

      then the getImports() method on module B does not provide module A. It seems that this case is skipped over in AbstractEffectiveModule.resolveModuleImports().

      I checked the RFC, and the situation seems legal, although it says:

      • on revision: "A module SHOULD have at least one initial "revision" statement."
      • on import: "If no "revision-date" substatement is present, it is undefined from which revision of the module they are taken."

      But if there is only 1 revision of a module available, it seems logical to take that one.

      Workaround is to add a revision to the imported module, then it works (and it's also the logical thing to do, to add the revision). So the severity of this bug is low.

      Attachments

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

        Activity

          People

            filip.gregor@pantheon.tech Filip Gregor
            verthezpw Peter Verthez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: