Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Java project running into many proto related errors "cannot find symbol" randomly on compiling Java srcs #746

Open
acmeofevolution opened this issue Feb 2, 2024 · 0 comments

Comments

@acmeofevolution
Copy link

acmeofevolution commented Feb 2, 2024

We have a monorepo gradle project in git which contains Java, and Proto sub projects in it. We are using protobug-gradle-plugin (0.8.19 version of com.google.protobuf.gradle.ProtobufPlugin) to build our protos to corresponding .java files which seems to be working fine till we randomly run into weird "Cannot find symbol" errors (100s of such errors without any local changes) for the Proto usage in other existing Java classes. We checked for the presence of the .class/.java files and everything looks fine at the surface and we still face these errors. We are using Java version: OpenJDK 1.8.0_392-zulu (build 1.8.0_392-b08) and Gradle 8.5 version for this monorepo. Also, the errors happen in the dev environment locally and never shows up in our Jenkins build pipelines. To bypass these errors, we need to run ./gradlew clean which cleans gradle cache and other related directories but developers lose quite a bit of time doing the build after a clean build.

Unfortunately, there are no clear/definite steps to reproduce this issue as I said it happens randomly. The most I can say that I have seen this happening if you try to pull the latest from git master to your local branch for the project after a few such pulls, it might show up. You might also be switching between the different git branches.

Has anyone ever seen anything like this before?

Please let me know if you need anymore information from my side to resolve this issue.

@acmeofevolution acmeofevolution changed the title Gradle project running into many proto related errors "cannot find symbol" on compiling Gradle Java project running into many proto related errors "cannot find symbol" randomly on compiling Java srcs Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant