Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-399

Some generated sources in yang-test show as unstaged/changed in Git

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Helium
    • None
    • adsal
    • None
    • Operating System: Linux
      Platform: PC

    • 852

    Description

      The *Module and *ModuleFactory source files that are generated by the yang-maven-plugin are put under src/main/java. Normally, these files are meant to be permanent (unless manually deleted) but the ones in yang-test aren't because the intent is to re-generate them on each build for testing so there is a yang-test maven plugin that deletes the source files before building. They actually are checked into Git but probably by accident.

      The yang-test maven plugin also inserts implementation code into the files after their generated. This should result in the files being the same on each build so git doesn't see them as changed but the code generator inserts a new time stamp into the files each time they're generated so git does see them as changed. This seems to be a recent change as it wasn't happening before.

      Instead of generating the files under src/main/java we should generate them under the git-ignored src/main/yang-config. The yangtools CodeGeneratorImpl class allows you to specify a "persistentSourceDir" that overrides the default src/main/java for "persistent" files. We should add this to the JMXGenerator as well.

      In addition, the ProcessSources class which rewrites the stub methods with implementation code needs to look in src/main/yang-config.

      Attachments

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

        Activity

          People

            tpantelis Tom Pantelis
            tpantelis Tom Pantelis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: