microsoft / microsoft/vscode-cpptools-api

Allow pointing `SourceFileConfigurationItem` to a compile_commands.json file.

Offen
#50 2 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
33
Forks
20
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Feature Request

When implementing a CustomConfigurationProvider for intellisense, it would be good to be able to construct a SourceFileConfigurationItem from an existing compile_commands.json.

At Arm we're developing an extension where different files in a project could belong to different build "contexts" e.g. for a different target or compiler toolchain, so we need to be able to set different intellisense configurations depending on which file is being viewed.

Currently I am trying to parse out the command portion of the compile_commands.json to get the compiler args/fragments, and building up the compilerFragments list, but it would be so much better to point at compile_commands.json directly, similar to how it is being done in the c_cpp_properties.json config.

I hope this makes sense. If you have any alternative ideas on how to achieve this, it would be great to hear about it.

Thanks!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

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

Beginnen Sie mit den APIs SourceFileConfigurationItem und CustomConfigurationProvider und vergleichen Sie anschließend deren aktuelles Verhalten mit der in der issue erwähnten Handhabung von c_cpp_properties.json. Legen Sie fest, wie eine compile_commands.json-Datei IntelliSense-Konfigurationen pro Datei bereitstellen soll, und bestätigen Sie die erwartete API und die Tests mit den Maintainer:innen; erledigt ist die Aufgabe, wenn Aufrufer auf die Datei verweisen können, ohne Compilerbefehle manuell zu parsen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
devtools
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

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