Skip to content
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

Merged
merged 2 commits into from
Oct 27, 2020

Conversation

andreeis
Copy link
Contributor

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.

@@ -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', () => {
Copy link
Member

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?

Copy link
Contributor Author

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();
});

Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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.

@bobbrow bobbrow merged commit bf9ac8f into develop Oct 27, 2020
@bobbrow bobbrow deleted the dev/andris/cmake_tools/GitHub1127 branch October 27, 2020 16:49
@bobbrow bobbrow added this to the 1.5.0 milestone Nov 4, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants