Type: LanguageService
Describe the bug
To Reproduce
Workspace
โโโ ProjectA
โ โโโ HeaderA.h
โโโ ProjectB
โโโ SouceB.cpp
c_cpp_properties.json config for ProjectB:{
"configurations": [{
"name": "Win32",
"browse": {
"path": [
"${workspaceFolder}",
"${workspaceFolder}/../ProjectA"
],
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"${workspaceFolder}",
"${workspaceFolder}/../ProjectA"
],
"intelliSenseMode": "msvc-x64"
}],
"version": 4
}
Edit and save HeaderA.h in ProjectA.
Edit SouceB.cpp, then you will find that the symbols changed in HeaderA.h is not refreshed.
Expected behavior
Refresh the symbols when related header has changed in a multi-root workspace.
Screenshots
Additional context
This is an unfortunate side effect of the current implementation of multiroot. Our multiroot implementation spawns an extension instance for each folder in the workspace and the file watcher events are only sent to the instance representing the folder where the file changed.
At some point we would like merge all the instances into a single one, but it hasn't made it to the top of the backlog yet. I'll start tagging related multiroot issues so we can get a sense of the relative importance of this refactoring work.
@bobbrow is there a way for outside contribution for this?
@roiche The multi-root code is implemented in the open source TypeScript code, so it's possible you could contribute a fix for this...but we might also need to make additional changes to the closed source part too (not sure yet). It seems like we should the TypeScript to send the messages to all the clients and let the clients determine if they should handle it or not, but I'm not too familiar with the multi-root stuff.
Our latest Insiders release has a new multi-root implementation (which fixes this bug): https://github.com/microsoft/vscode-cpptools/releases/tag/0.27.0-insiders. Please let us know if you find any multi-root-related bugs or regressions so we can prioritize fixing those for 0.27.0.