apache / apache/grails-intellij-plugin

Missing Grails Annotation in IntelliJ Groovy compiler

Open
#188 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

Running Compile or Make for a Grails 2 project gives different classes than Grails wrapper does. This makes Grails project to misbehave when using classes from IntelliJ out dir.

Full javap output of asset.pipeline.AssetsController in a stock "grails create-app" application (Grails 2.4.4, JDK 1.8.0_20) attached.
Difference in annotations is as follows.

Annotations in "target" directory:
```
...
#8 = Utf8 Lgrails/artefact/Enhanced;
...
#13 = Utf8 Lorg/codehaus/groovy/grails/plugins/metadata/GrailsPlugin;
...
RuntimeVisibleAnnotations:
0: #8(#9=s#10,#11=[s#12])
1: #13(#14=s#15,#9=s#16)
```
Annotations in "out" directory:
```
...
#8 = Utf8 Lgrails/artefact/Enhanced;
...
RuntimeVisibleAnnotations:
0: #8(#9=s#10,#11=[s#12])
```

---

*Imported from [IDEA-136644](https://youtrack.jetbrains.com/issue/IDEA-136644) · Type: Bug · Votes: 1*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the discrepancy by compiling or making a Grails 2.4.4 project in IntelliJ and comparing the resulting class in out with the Grails wrapper's class in target using javap. Trace the IntelliJ Groovy compiler path and its handling of Grails annotations, then verify that the generated class includes the missing GrailsPlugin annotation and matches the wrapper output.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.