vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

Need a way to await settings changes

Open bobbrow opened this issue 3 years ago • 0 comments

Brief Issue Summary

PR #2683 works around a problem we have with our tests. When a setting is changed, we call update from the VS Code API. This method is awaitable, but doesn't wait for the work triggered by a settings change to complete. We have our own set of event emitters that fire when settings change so that we can update internal state. But we don't have a way to wait for those events to complete.

We need to engineer something awaitable into our internal events such that we can wait for those events to complete when settings are changed by the tests. I'm thinking of some kind of wrapper for the callback in onChange at the bottom of config.ts that can add/remove promises that we can then await via some other public function.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

bobbrow avatar Aug 10 '22 23:08 bobbrow