Closed rweickelt closed 1 year ago
It does not work only once, when you have created the overriden-properties file in a time when the .vscode directory does not exists yet (when you open a projectat first time). In other cases it should work...
I will look why it does not work at first time, even if the related bug #40 was fixed.
I don't know why, but the node.js
file watcher does not work in case if the watcher was started before the file directory was created:
private async subscribeOverriddenPropertiesChanged() {
this._overriddenPropertiesWatcher?.close();
const propertiesPath = this.overriddenPropertiesPath();
this._overriddenPropertiesWatcher = chokidar.watch(propertiesPath, {ignoreInitial: true});
this._overriddenPropertiesWatcher.on('change', () => { this._onChanged.fire(QbsSettingsEvent.ProjectResolveRequired); });
}
this subscribe does not emit the change
event in that case... Maybe we need to add some workarounds, I don't know.
Fixed in v2.0.0
After saving overridden-properties.json, one has to run the resolve command explicitly. Instead, it would be nice if the project is automatically resolved after saving the override file. So the file needs to be watched somehow.