Closed jakobrosenberg closed 2 years ago
@Josverl have you got any thoughts on this? I'm tempted to merge it and save the config/state refactoring for a separate PR.
Task linked: CU-2v7nr6r Better handling of non-Pycom devices
Closed in favor of https://github.com/pycom/pymakr-vsc/pull/251
This PR auto detects the root path of devices, Pycom and third party.
I'm not a fan of using VSCode's
workspaceState
for this.WorkspaceConfiguration.update('field', value)
WorkspaceConfiguration.update('field', value, true)
ExtensionContext.workspaceState
ExtensionContext.globalState
Currently we use workspaceState for managing devices, but as the project grows, this could prove counter productive. If we switch to using configs rather than state, we may have greater control over which level (workspace vs global) at which we store data. This is predicated on workspace + global configs deep merging on retrieval. This is likely not the case, but is worth investigating.
At any rate, it might be time to consider a more flexible approach to storing state / config.