apache / apache/grails-intellij-plugin

build error: cannot find symbol (from groovy source of Grails plugin)

Open
#365 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

***What steps will reproduce the issue?***
1\. (on command line using Grails 2.5.6 and jdk1.8.0_121) grails create-app plain256
2\. File \> New \> Project from Existing Sources…
3\. add "runtime ':build-test-data:2.4.0'" to BuildConfig plugins {}

4\. Apply Grails changes to IDEA project structure…

5\. Build \> Build Project

***What is the expected result?***

Project builds without errors. Can run/debug a unit test in a JUnit configuration, as well as in a Grails configuration.

***What happens instead?***

build failed with 2 errors; cannot debug in a JUnit configuration. The two classes that the IDEA build cannot find are in the plugin's groovy source, which IDEA automatically included in the project's sources configuration. On the lines with the error, the editor will command-B navigate from the unfound symbol to the class file, which is shown in Project \> Grails as under a blue source directory, but IDEA's compiler cannot find them.

I have the same issue with two more plugins, quartz-1.0.2 and spring-security-core-2.0.0, on a much larger, older project, but the steps I gave seem like the simplest way to reproduce it. I see this on 2021.2.3 RC and 2021.2.2, but I'm not sure when it started. I was able to build for many years, although I think I have seen this kind of hiccup before. I've tried Invalidate Caches, restarting IDEA, and Rebuild Project, but nothing helps. A grails compile succeeds, but an IDEA Build Project still fails, which prevents me from using the JUnit configuration with the debugger, which would be faster for certain tests of mine.

---

*Imported from [IDEA-280306](https://youtrack.jetbrains.com/issue/IDEA-280306) · 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 failure with Grails 2.5.6, JDK 1.8.0_121, IntelliJ IDEA 2021.2.x, and the build-test-data plugin using the listed project steps. Start by comparing the plugin's Groovy source directory in the Grails project structure with the IDEA compiler configuration; done means IDEA Build Project resolves the symbols and permits the described JUnit debugging workflow.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.