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

Binding codegen should not tolerate duplicate files

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 14.0.0
    • None
    • Binding codegen
    • None

      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.

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

              Created:
              Updated: