Delete module folders on clearing settings#865
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
|
Due to the existence of bundled settings, I don't think I'll be able to move forward with this particular implementation. I'm going to keep this open, though, as it would be nice if we find a suitable alternative. |
|
It might be possible to add a new virtual method to the This way module devs could handle themselves what data, states, etc. (in the registered directories) should be reset to default (and which should be kept). We could even add a boolean property I guess adding new methods or properties on a class that is supposed to be inherited from could potentially introduce breaking changes, if any module already uses a method/property with this exact name. I feel like the chance for this could be kept low enough to still make this change. |
|
I have thought about that exact solution as well. |
|
It might still be worth to implement. At least I don't see any better solution. Forcing the deletion and making it opt-out (even just for modules that were developed for v1.3.0 or later) would probably be to drastic of a change I would assume? And having the mentioned protected method or opt-in would make it pretty easy to adapt for most modules. |
|
I'm not against the solution with a protected virtual method. In fact I would prefer something like this so that the devs can handle their own stuff accordingly. I just think that with the time it takes to get a new blish release out and modules getting updates (if ever) the "clear settings" function will have a lot of different effects. A protected virtual CleanupExternalSettings() function will be the best choice in that case I think. |








This PR aims to clear all files of modules that currently remain when deleting the module settings.
Some modules use external json files to save some states.
These states currently do not get deleted when clicking "Delete module settings" sometimes causing problems.
This PR will break module settings from certain developers choosing to use bundled folders:
