-
Notifications
You must be signed in to change notification settings - Fork 11
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
Plugin not compatible with 2023.1 #164
Comments
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. |
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 |
I can't reproduce this exception... |
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
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). |
Could you provide the code of the example-proto and example-service? |
But after I restart IDEA, the exception disappeared... All stub index function works... |
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 No projects open, opening example-proto first
No projects open, opening example-service first
Both projects open, example-proto in focusIn the below test case, I'm using the intellij project tabs, with the selected tab being referred to the one "in focus"
Both projects open, example-service in focusIn the below test case, I'm using the intellij project tabs, with the selected tab being referred to the one "in focus"
ConclusionThe 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 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 🥳 |
Looks like my trick worked, I will release a new hotfix version soon |
🐛 fix(ProtobufFileType.kt): add workaround for issue #164 The pluginVersion is updated to 1.7.11-EAP, which is the latest version of the plugin. A workaround is added to the ProtobufFileType.kt file to fix issue #164. The workaround initializes the ProtobufStubTypes to avoid a null pointer exception.
Fixed in 1.7.11 |
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
The text was updated successfully, but these errors were encountered: