microsoft / microsoft/vscode-cpptools

Update System include path/defines resolution strategies

Aperta
#10,847 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

docs Feature: Compile Commands Feature: Configuration help wanted Language Service
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

          @sean-mcmanus - thanks for the clarification! However, the [Customizing default settings](https://code.visualstudio.com/docs/cpp/customize-default-settings-cpp) article doesn't seem to indicate this order of evaluation. 

In the Updated c_cpp_properties.json syntax section, it states the following:

If a property is missing from c_cpp_properties.json, the extension will use the value in the VS Code setting.

And then in the System include path/defines resolution strategies section for when the open file is found in the compileCommands database, the following order of operations is listed:

  1. If systemIncludePath has a value, use it (continue to the next step to search for system defines).
  2. If compilerPath is valid, query it.
  3. Interpret the first argument in the command as the compiler and attempt to query it.
  4. If compilerPath is "", use an empty array for system include path and defines.
  5. If compilerPath is undefined, look for a compiler on the system and query it.

Based on these details, it's not clear from the documentation that the VS Code setting is evaluated differently from the value provided in the c_cpp_properties.json file. If the compilerPath from the VS Code setting does have lower presence than the command from the compile commands database, then it would be helpful if the System include path/defines resolution strategies section could be updated to reflect this.

Originally posted by @tcm0116 in https://github.com/microsoft/vscode-cpptools/issues/10842#issuecomment-1517100747

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Esamina le sezioni “Updated c_cpp_properties.json syntax” e “System include path/defines resolution strategies” nell’articolo collegato “Customizing default settings”. Confronta le descrizioni delle impostazioni di VS Code, di c_cpp_properties.json e di compileCommands, quindi conferma la precedenza prevista in base al contesto dell’issue. Il lavoro è completato quando la documentazione descrive chiaramente l’ordine effettivo di valutazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
vscode
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.