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

part1: patches to enable groovy-eclipse to run unpatched groovy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8-rc-2
    • 1.8.6, 2.0-beta-3
    • Compiler
    • None

    Description

      Groovy-Eclipse runs a patched form of groovyc. I want to start moving those patches back into groovyc itself, with the medium term goal of running an unpatched groovyc. Initially I'm collected together a few small things here, just to see if we have a process that can work for us. This patch was created on 1.8.0 rc2 and as far as I can tell still passes all the groovy tests (I simply ran 'ant install' to check). What does it contain:

      GrabAnnotationTransformation. A null check. Under groovy-eclipse we operate a recoverable compiler so that we don't totally give up on the first problem encountered. This means sometimes code now runs that has to make an attempt to cope with errors having happened earlier on. Usually this is just a 'check if null, don't do this operation' type thing. This null check is one such case of that.

      VariableScope. Extra helper method for accessing an iterator over the declared variables.

      CompilationUnit/GroovyClass. When eclipse is processing 'GroovyClass' objects, it is very helpful to know where they came from. The patches here cause GroovyClass to know its originating classNode and SourceUnit.

      ResolveVisitor. Under eclipse we have a subclass of resolve visitor that resolves types using JDT information. To do its work it needs to override some methods - this patch changes some methods from private to protected.

      .classpath The .classpath currently in 1.8.0rc2 is out of date, some dependencies are missing and some haven't been added. This fixes those.

      In addition it would be nice to get GROOVY-4553 fixed - is it definetly going to be in 1.8-rc-4? (that is the current target)

      I'm not saying these changes need to be in 1.8.0, because you are in RC phase, but sometime in the early 1.8 streams would be nice. I tried to pick non-controversial changes initially - the tricky stuff is still to come. As of the 1.8.0 patch job I just did we currently modify around 50 groovy files, every little we can do to reduce that will help.

      Attachments

        Activity

          People

            paulk Paul King
            aclement Andy Clement
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: