redhat-developer / redhat-developer/vscode-java

Diagnostics do not work on symlinked files

Open
#2,326 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug diagnostics
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Syntax highlighting does not work on symlinked files, but it does on original one.

Environment
  • Operating System: Ubuntu 20.04
  • JDK version: 13.0.7
  • Visual Studio Code version: 1.63.2
  • Java extension version: 1.3.0
Steps To Reproduce
  1. Create a sample java project with a .java file and introduce an error to it (e.g. use HashMap<String, String> without importing HashMap).
  2. You should see HashMap underlined with an error HashMap cannot be resolved to a type
  3. Create a symlink of the file to somewhere outside the project (in ubuntu: ln -s <path to original file> <path somewhere outside src/main/java structure>)
  4. The new file won't have HashMap underlined

original code with expected behavior
symlinked code with unexpected behavior

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

Reproduce the issue with the listed Ubuntu, JDK, and VS Code setup, comparing diagnostics on the original and symlinked .java files. Trace how files outside the src/main/java structure are handled; done means the symlinked file shows the same diagnostic as the original.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, tooling
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.