Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8591

Consider additional target bytecode checks and/or simplification in some areas

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0-alpha-1
    • None
    • None

    Description

      As part of fixing GROOVY-8579, I noticed that we don't do many checks for bytecode version. There are several areas that are possibly worth addressing:

      • In CompilerConfiguration we have a minimum bytecode version but we don't give an error or warning if the bytecode version is set to a value below the minimum version. If we did, would we even need the old, e.g. 1.4, 1.5 values in the allowed JDKs list? One option is to just check at the periphery, e.g. in groovyc/groovy options and assume people using the api know what they are doing?
      • There are some places where we produce very vanilla bytecodes and don't require a very high bytecode level, e.g. ProxyGeneratorAdapter (currently V1_5). Should we align those also with the minimum JDK version?
      • We have some checks that make sure we are using an annotation compatible JDK. These can surely be removed/simplified. Examples: ExtendedVerifier, JavaAwareCompilationUnit, JavaStubCompilationUnit.
      • We have some checks to ensure that we have a high enough bytecode level when using indy. Since our minimum (Groovy 2.5+) is now high enough to support indy, many of theose checks could be simplified/removed. One example is in WriterController#chooseBytecodeVersion.

      Attachments

        Activity

          People

            emilles Eric Milles
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: