google / google/error-prone

Error building in IntelliJ due to cyclic dependency

Open
#4,733 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

Since https://github.com/google/error-prone/pull/4621, I have been unable to build the project in IntelliJ (currently 2024.3.1.1). Certain files in the `check_api` module fail to compile; the error I see is `cannot find symbol` for `class CompilationTestHelper`.

This appears to be caused by a cyclic dependency that was resolved for the Maven build by [excluding some files from compilation](https://github.com/HubSpot/error-prone/blob/c897d8f4cd5ab310af4dca63bf1acf2d10f6f49f/check_api/pom.xml#L165-L173). IntelliJ doesn't pick up this configuration automatically (though arguably it should), so I had to manually exclude these files myself (Build, Execution, Deployment > Compiler > Excludes, or right-click each file in the compile output window and click 'Exclude from Compile').

It'd be great if this cyclic dependency could be resolved so this manual setup isn't needed (and so these files can be worked on in IntelliJ if need be), but I'm sure that's a bit of a web to be untangled. Barring a fix, I feel it would be useful to include this information in [the developer wiki](https://github.com/google/error-prone/wiki/For-Developers#set-up-your-work-environment) along with the other IDE-specific setup instructions there.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.