redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.05k stars 420 forks source link

Intellisense breaks for JDK types when certain (scala) libs are on the classpath #3690

Open spangaer opened 5 days ago

spangaer commented 5 days ago

When triggering autocomplete (ctrl+space) targeting JDK type java.lang.reflect.Field or java.util.List and certain (scala) libs are on the classpath, expected suggestions are not coming.

I've observed that List and Function are broken by the scala lib itself and Field is broken by Akka HTTP

Environment
Steps To Reproduce
  1. Attempt auto complete on variable type

Reproducer with dev container: https://github.com/spangaer/vscode-javals-completion-issue (Dev container because SBT generated eclipse files, but my guess is that doesn't matter)

Current Result

image image

Expected Result

image image

Additional info

It looks to be really specific to the code completions. e.g creating a local var using Quick Fix... type inference does find the JDK types.

spangaer commented 4 days ago

Classic Eclipse(2024-06) seems to get away with this, for the same project files

image image

spangaer commented 1 day ago

Btw, I did attempt to get something meaningful out of the logs, but did not succeed.

Tracing LSP was a bit of a needle in a haystack, if you have no clue what to look for.