microsoft / microsoft/vscode-cmake-tools
Need a way to await settings changes
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### 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_
Contributor guide
Research direction
Start in config.ts at the onChange callback and review PR #2683, which works around the settings-update timing problem. Trace the internal event emitters used after settings change, then define an awaitable public mechanism that tests can use; done means callers can wait until those events have completed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100