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

Grails compiler is broken because CompilationUnit.PrimaryClassNodeOperation is no longer called like it used to be

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.6-beta-1
    • 1.6-beta-2
    • class generator
    • None

    Description

      One of the failing tests in Grails is because the custom CompilationUnit.PrimaryClassNodeOperation we use is no longer being called as it used to be. Essentially we extend Groovyc and override the makeCompilationUnit method as follows:

          protected CompilationUnit makeCompileUnit() {
      
              def unit = super.makeCompileUnit();
              def classInjectors = [new DefaultGrailsDomainClassInjector()] as ClassInjector[]
              def injectionOperation = new GrailsAwareInjectionOperation(GrailsResourceLoaderHolder.resourceLoader, classInjectors)
              unit.addPhaseOperation(injectionOperation, Phases.CONVERSION)
              return unit        
          }
      

      However this no longer seems to have an effect causing domain classes to break

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            graemerocher Graeme Rocher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: