-
Notifications
You must be signed in to change notification settings - Fork 90
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
How do i get the LSP to pick up protobuf generated classes #270
Comments
this: #71 I think that you can manually alter |
I dont think that you can manually edit the .classpath file. whenever i put a |
I have luck with the hint of #270 (comment) dealing with a project that has generated classes sources to folder I add the following config in
after execute if the file already opened in buffer and auto-completion not working, I found that |
@kingsuntw i have this weird issue where whenever i modify a |
Was this ever resolved? I've been struggling with this for a while now. I have a multi-module maven project with generated sources. I already built everything from the command line. I can see the artifacts in the m2 repo. But lsp-java does not see them. I'm not sure if it's building everything, but the errors all seem to be due to symbols from generated sources. The .classpath files appear to have been automatically generated. Is there something else I need to do to tell it where to look? |
I discovered that I can manually edit the .classpath in the project that can't resolve the missing types like so:
As soon as I save, the number of errors drops. However, then some process immediately overwrites .classpath. I don't have the option of modifying the pom files as suggested in the solution linked above. Another problem is that there are a lot of projects. I would have to go through every one, though I would do it if I could solve the first problem. |
I can confirm that at least the solution linked to by rrudakov does work. One thing I noticed, though, is sometimes projects that depend on generated files report errors, but as soon as you open the file with errors, the errors immediately go away. The behavior does not seem to be very consistent. I'm still trying to figure out how to add a certificate through vmargs. Maybe the strange behavior will resolve once the rest of the errors have been dealt with. |
Once I worked through the remaining issues, the funny behavior has disappeared. |
"goldfita" ***@***.***> writes:
Was this ever resolved? I've been struggling with this for a while
now.
I have a multi-module maven project with generated sources. I already
built everything from the command line. I can see the artifacts in the
m2 repo. But lsp-java does not see them. I'm not sure if it's building
everything, but the errors all seem to be due to symbols from
generated
sources.
The .classpath files appear to have been automatically generated. Is
there something else I need to do to tell it where to look?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
I was able to set it up with build-helper-maven-plugin. I had to add
this plugin to pom.xml of the module which generates sources (in my case
it was jooq library). I don't work with java now, so unfortunately I
cannot provide more details.
|
After the senior developer updated jaxb and made a few other changes to the pom, the problem went away. |
The suggested fixes didnt work for fabric minecraft mod development |
when i generate classes via protobuf i get warnings all over my code with
{ClassName} cannot be resolved to a type
and there is no code completion. gradle seems fine finding them to compile. is there anything i have to include or a hint i can give the lsp to pick these files up?The text was updated successfully, but these errors were encountered: