You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compile commands file watchers are leaked without being closed #12946
If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
When using compileCommands in a configuration, deleting the json file causes the fallback function checkCompileCommands() in src\LanguageServer\configurations.ts to dispose the file watchers without closing them.
Steps to reproduce:
Use the compileCommands configuration with a path to a compile_commands.json.
Update the file's timestamp. (touch it or compile a CMake project which updates it)
CppProperties.compileCommandsFile is updated with a value.
Delete or rename the file.
next periodic call to checkCompileCommands() will enter the error case and leak the file watchers.
// in checkCompileCommands()
fs.stat(compileCommandsFile, (err, stats) => {
if (err) {
if (err.code === "ENOENT" && this.compileCommandsFile) {
// file watchers should be closed herethis.compileCommandsFileWatchers = []; // reset file watchers
Expected behavior: checkCompileCommands() should close the file watchers before disposing.
Activity