redhat-developer / redhat-developer/vscode-java

"Cannot find symbol"

Open
#551 9 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug ls-error/crash
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

VS Code shows a "Cannot find symbol" error with the red squigly for several symbols but "Go to definition" works which means the definition is available.

Environment
  • Operating System: Ubuntu 18.04
  • JDK version: 1.8.0_171
  • Visual Studio Code version: 1.23.1
  • Java extension version: 0.26.0
Steps To Reproduce
  1. Open the attached dummy project in VS Code.
Current Result

You should see several errors related to "cannot find symbol". However, navigation or "Go to definition" works on these symbols.

Expected Result

The red squiggly lines should not appear since I think the symbols are indeed available.

Additional Informations

The VS Code settings.json file is also attached.
java-symbols.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening the attached java-symbols.zip project in VS Code with the provided settings.json and reproduce the diagnostics on Ubuntu with the listed Java and extension versions. Compare the symbols reported with red squiggles against those reachable through Go to definition; done means valid symbols no longer produce erroneous "Cannot find symbol" diagnostics while navigation still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.