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

Having multiple revisions of the same YANG model causes build warnings/errors

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: Mac OS
      Platform: PC

    • 1514

    Description

      I spent some time this weekend trying to root out all the warnings which building the TTP project, and I managed to get everything but this:

      [INFO] yang-to-sources: Found 2 yang files in /Users/ckd/.m2/repository/org/opendaylight/controller/sal-core-spi/1.1-SNAPSHOT/sal-core-spi-1.1-SNAPSHOT.jar: [META-INF/yang/opendaylight-config-dom-datastore.yang, META-INF/yang/opendaylight-operational-dom-datastore.yang]
      [WARNING] Error while sorting module [ietf-yang-types, Mon Jul 15 00:00:00 CDT 2013]: module with same namespace (urn:ietf:params:xml:ns:yang:ietf-yang-types) already loaded: [null, null]
      [WARNING] Error while sorting module [ietf-yang-types, Mon Jul 15 00:00:00 CDT 2013]: module with same namespace (urn:ietf:params:xml:ns:yang:ietf-yang-types) already loaded: [null, null]
      [WARNING] Error while sorting module [ietf-yang-types, Mon Jul 15 00:00:00 CDT 2013]: module with same namespace (urn:ietf:params:xml:ns:yang:ietf-yang-types) already loaded: [null, null]
      [INFO] yang-to-sources: YANG files parsed from [META-INF/yang/ttp.yang]
      [INFO] yang-to-sources: Code generator instantiated from org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
      [INFO] yang-to-sources: Sources will be generated to /Users/ckd/git-reps/ttp/ttp-model/src/main/yang-gen-sal
      [WARNING] Error while sorting module [ietf-yang-types, Fri Sep 24 00:00:00 CDT 2010]: module with same namespace (urn:ietf:params:xml:ns:yang:ietf-yang-types) already loaded: [null, null]
      [WARNING] Error while sorting module [ietf-yang-types, Fri Sep 24 00:00:00 CDT 2010]: module with same namespace (urn:ietf:params:xml:ns:yang:ietf-yang-types) already loaded: [null, null]

      It seems like it stems from the fact that we have multiple versions of the same YANG module. Usually from the IETF models. I'm also attaching the many, many such warnings you get while building the controller.

      I haven't spent enough time in the code to understand if there's a simple fix, but it seems like something that would be nice to have resolved for Helium.

      The actual logged message seems to be coming from line 189 of yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ModuleDependencySort.java in the yangtools project.

      Attachments

        Issue Links

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

          Activity

            People

              mvitez@cisco.com Martin Vitez
              colindixon Colin Dixon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: