-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit for immediate effect of settings #1500
Conversation
…nerator related. Remove .on('raw' listener in the kits file watcher.
@@ -152,6 +152,21 @@ export class CMakeTools implements vscode.Disposable, api.CMakeToolsAPI { | |||
private readonly _codeModel = new Property<codemodel_api.CodeModelContent|null>(null); | |||
private _codeModelDriverSub: vscode.Disposable|null = null; | |||
|
|||
private readonly _communicationModeSub = this.workspaceContext.config.onChange('cmakeCommunicationMode', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know what 'sub' means here. I know it's reused from other places, but it doesn't really make sense to me. Can you open an issue to rename some of these things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.info(localize('preferredGenerator.changed.restart.driver', "Restarting the CMake driver after a preferredGenerators change.")); | ||
return this._reloadCMakeDriver(); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expected to see watchers for configureArgs/Settings. I noticed there is something in driver.ts that should be doing it, but there are still reports of those config settings not initiating a reload of the driver. Are you able to repro that at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I saw the reports and I tried but I wasn't able to reproduce. They seemed to update fine for me. I tried windows and linux, fileApi and serverApi. Can you also try to reproduce configureArgs/Settings not getting updated between a settings change and a configure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there may be a bug with deleting the whole setting not taking effect, but I'm not going to block this PR on that. We can open a bug for it. The important scenario of being able to add settings to a fresh folder appears to be working, so I'll approve.
Ensure immediate effect for settings: cmakeCommunicationMode, generator and preferredGenerators.
More to be investigated and eventually fixed in a following commit.
Also reverted #1417 since we need to fix it in a different way.
Opened #1498 to track the alternative fix of the above PR.