microsoft / microsoft/vscode-cpptools

Duplicate entries in reference panel when using Windows junction

Offen
#14,760 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere das Problem mit einer Windows directory junction, einer compile_commands.json, die den junction path verwendet, und der Referenzsuche in der C/C++ extension. Beginne damit nachzuverfolgen, wie die extension Pfade aus der compilation database liest und Referenzergebnisse darstellt; abgeschlossen ist es, wenn Referenzen, die über den junction path und den real path erreicht werden, nur einmal erscheinen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, typescript
Bereich
operating-systems, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.