Duplicate entries in reference panel when using Windows junction

未关闭
#14,760 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp, typescript

调研方向

使用 Windows directory junction、采用 junction path 的 compile_commands.json,以及 C/C++ extension 中的引用搜索来复现该问题。首先跟踪 extension 如何读取 compilation database 路径并呈现引用结果;完成的标准是:通过 junction path 和 real path 到达的引用只出现一次。

由索引模型根据 Issue 内容生成。

描述

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:

  1. Create a directory junction.
  2. Generate a compile_commands.json that uses this directory path.
  3. Load the folder in VSCode with C/C++ plugin (setup to use this compilation database).
  4. 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

主要语言
TypeScript
星标
6.2k
派生
1.7k
平均合并
14 小时 46 分钟
30 天内合并 PR
61

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-cpptools 的其他 Issue

查看 microsoft/vscode-cpptools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。