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 here
this.compileCommandsFileWatchers = []; // reset file watchers
Expected behavior:checkCompileCommands() should close the file watchers before disposing.
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
When using
compileCommands
in a configuration, deleting the json file causes the fallback functioncheckCompileCommands()
insrc\LanguageServer\configurations.ts
to dispose the file watchers without closing them.Steps to reproduce:
compileCommands
configuration with a path to acompile_commands.json
.touch
it or compile a CMake project which updates it)CppProperties.compileCommandsFile
is updated with a value.checkCompileCommands()
will enter the error case and leak the file watchers.Expected behavior:
checkCompileCommands()
should close the file watchers before disposing.Configuration and Logs
Other Extensions
No response
Additional context
No response