Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-350

Binding codegen should not tolerate duplicate files

    XMLWordPrintable

Details

    • Improvement
    • Status: Confirmed
    • Medium
    • Resolution: Unresolved
    • None
    • 14.0.0
    • Binding codegen
    • None

    Description

      Duplicate classes are indicative of a mapping conflict and we should not merely warn on them, but rather fail the build unless instructed otherwise.

      Refactor org.opendaylight.mdsal.binding.java.api.generator.GeneratorJavaFile and org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl to perform two-stage file/codegen mapping so that they lazily map files/content.

      GeneratorJavaFile.generateToFile() needs to be updated to return Map<File, CharSource>, which will contain unique mapping. It should take a flag indicating whether conflicts should cause an abort or should be ignored. CodeGeneratorImpl needs to then perform the actual generation output and route maven configuration to that flag.

      Attachments

        Issue Links

          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated: