Repository navigation
Move database and plugin startup out of the service registration - #177
Merged
Merged
Conversation
DependencyInjection registered services, migrated the database and started plugins. DatabaseInitializer and PluginStartup now do the last two. Where a plugin's configuration comes from was decided at startup and again in the Settings dialog. IPluginConfigurationSource decides it for both, and no longer reads Plugins:Directories as a plugin called Directories.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Infrastructure.DependencyInjectionregistered services, migrated the database and started plugins. Where a plugin's configuration comes from was decided twice, at startup and in the Settings dialog, and the two copies differed. The startup copy also readPlugins:Directoriesas the configuration of a plugin calledDirectories.What changes
DatabaseInitializertakes over the database half, moved as it is. The backup and migration steps and their order don't change.PluginStartuptakes over loading and starting plugins, with explicit arguments instead of optional ones.IPluginConfigurationSourceis the one place that decides the source: a plugin saved in user settings gets exactly that, andPlugins:<id>from the configuration only provides initial values. Startup andSettingsOrchestratorboth use it, and the orchestrator no longer needsIConfiguration.Plugins:Directoriesis no longer treated as a plugin.Behavior to check
The Settings dialog used to take only the keys of known fields from
Plugins:<id>, while startup passed all of them. It now takes all of them too, so a plugin that has no saved settings yet keeps every key from the file once the dialog saves it. The dialog no longer drops those keys on save, which would have restarted the plugin with a different configuration. Nothing changes for a plugin already in user settings, and the settings file format is the same.Testing
Plugins:Directories. The migration tests, includingExistingDatabaseMigrationTests, now go throughDatabaseInitializer.providersfrom the CLI and the Debug GUI for 20 seconds with the real development settings: all six plugins started. The only warnings were the hotkey and the Stream Deck pipe being taken by the installed app running at the same time.Plugins:<id>section inappsettings.jsonin a running app, which only the tests cover.