vscode-cpptools
vscode-cpptools copied to clipboard
`provideConfigurations` is called with duplicate URI:s
Environment
- OS and Version: WSL Ubuntu 22 / Windows 11
- VS Code Version: 1.89.0-insider
- C/C++ Extension Version: 1.20.0 pre-release
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
When cpptools calls provideConfigurations of a custom configuration provider, the uris parameter always contains the same uri twice:
This first appears in version 1.19.5 -- if I downgrade to 1.19.4 it works as expected.
Steps to reproduce:
- Run an extension that registers a
CustomConfigurationProvider - Put a breakpoint in your
CustomConfigurationProvider'sprovideConfigurations. - Open a file to trigger cpptools to query your extension for the file's intellisense configuration.
- Look at the
urisparameter passed in -- it contains the same URI that you just opened twice.
Expected behavior: Each uri should only appear once.
Configuration and Logs
Relevant section from the `C/C++` output channel (here using CMake Tools):
LSP: (received) textDocument/didOpen: file:///home/hampusad/EW%20Projects/CMakeTest/func.c
LSP: (invoked) cpptools/queryTranslationUnitSource: file:///home/hampusad/EW%20Projects/CMakeTest/func.c (id: 7)
LSP: (invoked) textDocument/didOpen: file:///home/hampusad/EW%20Projects/CMakeTest/func.c
Populating file name cache...
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
Intellisense update pending for: file:///home/hampusad/EW%20Projects/CMakeTest/func.c
Done populating filename cache. Elapsed time: 28 ms
LSP: Sending response (id: 7)
Custom configurations received:
uri: file:///home/hampusad/EW%20Projects/CMakeTest/func.c
config: {
"includePath": [],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"compilerArgs": [],
"compilerFragments": [
"-g",
"--debug"
]
}
uri: file:///home/hampusad/EW%20Projects/CMakeTest/func.c
config: {
"includePath": [],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"compilerArgs": [],
"compilerFragments": [
"-g",
"--debug"
]
}
Other Extensions
No response
Additional context
No response
@Colengms do you know what might have caused this?
@HampusAdolfsson Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.20.2 .