Draft
Conversation
b3a2020 to
25d388c
Compare
f628123 to
32b1c0f
Compare
At long last, config hot reloading! This introduces a config diffing system that tries to minimise the amount of reloading that needs to take place, according to the following rules: - Monitors switching from single <--> multiple bars will need a full reload of all bars - Bars with non-module configuration changes, or a change to the number of modules are fully reloaded - Changes at a module level replace just that module. This means that you can add, remove and change entire monitor configurations, individual bars, and modules and Ironbar will do its best to minimise the impact. Hot-reloading does not currently support top-level config options other than `bar` and `monitors`. Some of these are likely to never be supported but this still requires exploration. This also adds a new top-level `hot_reload` option, which takes two formats: - `hot_reload: <true/false>` - enables/disables for both config and styles. - `hot_reload.config` and `hot_reload.style` which can be used to toggle each system separately.
32b1c0f to
2cd19e0
Compare
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.
At long last, config hot reloading! This introduces a config diffing system that tries to minimise the amount of reloading that needs to take place, according to the following rules:
This means that you can add, remove and change entire monitor configurations, individual bars, and modules and Ironbar will do its best to minimise the impact.
Hot-reloading does not currently support top-level config options other than
barandmonitors. Some of these are likely to never be supported but this still requires exploration.This also adds a new top-level
hot_reloadoption, which takes two formats:hot_reload: <true/false>- enables/disables for both config and styles.hot_reload.configandhot_reload.stylewhich can be used to toggle each system separately.The code for this is still a little messy and prototypal, and I'm not sure I've caught every edge case yet, so leaving as draft for now. This does work for the most part though, so publishing for others to test and play with.