I see some bugs here:
BUG1:1, I have 5 cbp files in the same folder, and I also have a workspace file which contains the 5 cbp files.
2, I open the workskpace, and switch the active project between those 5 cbps
3, When I close the C::B or close the workspace, I got 4 error messages:
19:17:44: File 'D:\code\plugin\wxModularApp\build\.cache\Clangd-cache.lock' couldn't be removed (error 2: 系统找不到指定的文件。)
19:17:45: File 'D:\code\plugin\wxModularApp\build\.cache\Clangd-cache.lock' couldn't be removed (error 2: 系统找不到指定的文件。)
19:17:45: File 'D:\code\plugin\wxModularApp\build\.cache\Clangd-cache.lock' couldn't be removed (error 2: 系统找不到指定的文件。)
19:17:45: File 'D:\code\plugin\wxModularApp\build\.cache\Clangd-cache.lock' couldn't be removed (error 2: 系统找不到指定的文件。)
The Chinese words means "System cannot find the file specified.".
So, I think that this plugin use the same .lock file name for all the cbp projects?
BUG2:1, I have 5 cbp files in the same folder, and I also have a workspace file which contains the 5 cbp files.
2, I open the workskpace, and switch the active project between those 5 cbps.
3, Now, I use the git tool to update those 5 cbp files, and C::B asked that whether I need to reload the cbp files, I press "all".
Now, I see that my CPU usage is from the 25% CPU (which is the 1 thread in my clang_client setting) to 100%, and I see 4 clangd.exe running in the task manager window.
Each process of clangd eat about 25% of the cpu.
I guess that when 5 cbp files get reloaded in the same time, it will trigger several clangd.exe to run.
My testing project is:
asmwarrior/wxModularApp: Cross-Platform Modular Application (Main app + plugins) example for C++/wxWidgets