microsoft / microsoft/vscode-cpptools
Duplicate entries in reference panel when using Windows junction
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: Windows 11 Enterprise 25H2
- VS Code Version: 1.137.0
- C/C++ Extension Version: 1.34.4
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
To workaround the Windows file path limit, I created a directory junction C:\projects that maps to a lengthy directory. I opened my project through this junction directory in another IDE, which generated a compile_commands.json using this junction directory.
When I search for references with the C/C++ plugin, it will show entries for the file in the junction directory as well as via the real path. So, I'm seeing everything duplicated.
Steps to reproduce:
- Create a directory junction.
- Generate a compile_commands.json that uses this directory path.
- Load the folder in VSCode with C/C++ plugin (setup to use this compilation database).
- Search for a reference to something.
Expected behavior: Only one of the junction path or real path is shown. Not both.
Configuration and Logs
N/A
Other Extensions
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a Windows directory junction, a compile_commands.json using the junction path, and reference search in the C/C++ extension. Start by tracing how the extension reads compilation database paths and presents reference results; done means references reached through the junction and real path appear only once.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100