Description
If you annotate a groovy class with @TypeChecked or @CompileStatic and that the code uses an extension module, then compilation fails as if the type checker doesn't find the extension classes.
Using
compileTestGroovy.groovyOptions.useAnt = true
fixes the problem.
To reproduce, first step will build and install an extension module into local maven repo.
$ git clone https://github.com/swilliams-vmw/gemfire-groovy-extensions.git
$ cd gemfire-groovy-extensions
$ ./gradlew install
Second, download this test project: http://dl.dropbox.com/u/20288797/dive...
$ cd test $ ./gradlew clean test
passes. Now open build.gradle, remove the useAnt=true option and the project compilation fails.
Investigation shows that the type checker should try to load the extension modules from the source unit classpath instead of using the ones from the MetaClassRegistry.
Attachments
Issue Links
- is related to
-
GROOVY-6806 The type checker should use the transform loader instead of the source unit loader for extension methods
- Closed