Closed nofarius closed 1 year ago
I have the same problem!
This is very strange, because I did not modify the relevant content, and this exception did not appear when testing.
It seems that JetBrains' own plugins also have such exceptions, and I will continue to investigate.
I just tried to fix everything that was suspicious, if you are handy you can download the EAP version from the link below and help me check if the exception is still there.
https://github.com/devkanro/intellij-protobuf-plugin/discussions/165
I just tried disabling all downloaded plugins, disabling the built-in proto and grpc plugins and updating to the EAP 1.7.1 version, and I still get the same error 😢
@nofarius Does the exception occur after opening the project? Can you invalidate cache(File -> Invalidate Caches...) and import the project again?
I can't reproduce this exception... What is your project language and build tool? Java? Go? Maven? Gradle?
The invalidating caches seem to have fixed it. Did the following and now it's working
Testing rolling back to 1.7.0:
So seems invalidating caches works for 1.7.0 as well
OK, this seems to be a bug in JB's handling of the Stub cache after the IDEA upgrade
It seems I jumped the gun, it works until you restart intellij again. Getting the same error after restarting
What is your project language and build tool? Java? Go? Maven? Gradle?
Java and Maven
Bit more info trying to isolate/replicate
In a 2-project setup
The below is after invalidating caches
Opening the example-proto project, and reopening, no errors
Opening the example-service project (no error). Then wait for caches/indexes to complete. Close and reopen intellij and then it errors loading the example-service project
Could you provide the code of the example-proto and example-service?
I couldn't reproduce this problem in debug environment, but it did appear after upgrading my IDEA.
I'm guessing it has something to do with this new feature added in 2023.1
But after I restart IDEA, the exception disappeared...
All stub index function works...
Could you provide the code of the example-proto and example-service?
They were just example names, they're not really projects I can share as they contain proprietary code, sorry! It was more meant to describe that we use 2 projects, one for the proto files exclusively, and the other for the actual java grpc service implementation that references the proto project as a maven dependency (we don't store them in the same project).
Adding some more test cases
In the below test case, I'm using the intellij project tabs, with the selected tab being referred to the one "in focus"
In the below test case, I'm using the intellij project tabs, with the selected tab being referred to the one "in focus"
The error seems to only occur in the java service implementation project, not the proto-only project. Having intellij load successfully with the proto project stops the error from occurring at all, even when loading the java service project afterwards.
Maybe the issue with the stub index is specifically related to interactions when intellij is also loading java indexes?
If you are trying to replicate this using a project that only contains a proto file then this may explain why it works for you. Do you have a project that you can test with that contains a java implementation of the grpc service defined in the proto?
Our backend service also contains a pure proto gradle project for sharing with other teams like client and web, and a corresponding backend implementation.
I will try your case in our project, but in terms of my usage, it seems that I have not encountered any problems so far.
I encountered the same problem.
@zhaoshuxiang @nofarius Please try #169
I am trying make some tricks to fix it
@zhaoshuxiang @nofarius any updates?
Hey @devkanro, looks like it is now working. Repeating the tests I did above, the ones that were failing are now working :partying_face:
Looks like my trick worked, I will release a new hotfix version soon
This version isn't on the marketplace yet: https://plugins.jetbrains.com/plugin/16422-protobuf/versions
@ptxmac please check it again https://plugins.jetbrains.com/plugin/16422-protobuf/versions/stable/321456
Thanks!
Hi,
When opening Intellij 2023.1 I get the following error from this plugin. I'm using the latest v1.7.0.
I can confirm that the default protobuf and grpc plugins are disabled, and the error only started happening when upgrading to 2023.1
Please let me know any additional information you need from my end
Edit: I just tried disabling all external plugins (and the proto/grpc internal ones) and the same error occurs, so it doesn't seem to be an interaction problem with a different plugin