microsoft / microsoft/vscode-cpptools
"configurationProvider" property disappearing
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Environment
- OS and Version: Windows 11 Pro 22H2, build 22621.2428
- VS Code Version: 1.83.1
- C/C++ Extension Version: tried both 1.17.5 and 1.18.0
- If using SSH remote, specify OS of remote machine: tried with both native Windows as well as a WSL remote (WSL 1.2.5.0 running Ubuntu 22.04.2 LTS).
Bug Summary and Steps to Reproduce
Bug Summary:
While editing c_cpp_properties.json, trying to add the "configurationProvider" property results in the current line and existing comments being deleted. Note that properties other than configurationProvider do not seem to have the same behaviour. It could be that this is the intended behaviour, however, it makes it difficult to browse the available values of the property.
Steps to reproduce:
- Install the C/C++ extension
- Open an empty folder
- Use the Edit Configurations (JSON) command to create and open the c_cpp_properties.json configuration file
- Try to add the property "configurationProvider", letting it be autocompleted to "configurationProvider": "". Alternatively, type it in manually.
- Notice the property as well as any existing comments disappearing. Note that it seems to happen on saving the configuration file.
Expected behaviour:
"configurationProvider": "" and comments not disappearing.
Configuration and Logs
c_cpp_properties.json:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
// Random comment
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
]
}
],
"version": 4
}
C/C++ language server debug log:
LSP: cpptools/didChangeCppProperties (id: 46)
LSP: cpptools/didChangeCppProperties (id: 47)
LSP: cpptools/didChangeCppProperties (id: 48)
LSP: cpptools/didChangeCppProperties (id: 49)
C/C++ Configuration Warning:
[10/24/2023, 11:04:39 AM] For C++ source files, the cppStandard was changed from "c++17" to "".
[10/24/2023, 11:04:39 AM] For C source files, the cStandard was changed from "c11" to "".
Other Extensions
All other extensions are disabled, even though disabling them did not change the behaviour.
Additional context
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riprodurre il comportamento di salvataggio in c_cpp_properties.json usando il comando Edit Configurations (JSON), aggiungendo configurationProvider e un commento. Tracciare la gestione del file di configurazione da parte dell’estensione C/C++ per trovare dove vengono rimossi la proprietà e i commenti. Il lavoro è completato quando il salvataggio conserva sia la proprietà configurationProvider sia i commenti esistenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100