Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserDefaultsUpdater cleanup #405

Open
herzbube opened this issue Feb 26, 2023 · 0 comments
Open

UserDefaultsUpdater cleanup #405

herzbube opened this issue Feb 26, 2023 · 0 comments

Comments

@herzbube
Copy link
Owner

herzbube commented Feb 26, 2023

The UserDefaultsUpdater class contains many old upgrade methods that require registration domain defaults as input. These upgrade methods possibly no longer work.

Two ways to clean up the mess:

  1. Rewrite the old upgrade methods to work with constant data defined in the private scope of the UserDefaultsUpdater class. This requires digging into the version history past of the project to examine how the registration domain defaults looked like at the time when each upgrade method was implemented. While this solution is certainly the cleanest, the effort vs. benefit is doubtful. How much effort should be put into preserving a pristine user defaults upgrade path since the project was conceived over a decade ago?

  2. Remove the old upgrade methods. It seems quite reasonable to get rid of upgrade methods that are very old (10 years or more), but the closer to the present the upgrade method was implemented the more valuable it appears. Before choosing this solution, a list should be made of how long ago each upgrade method was implemented, then a re-evaluation should be made whether it would make sense to preserve a few of the newest upgrade methhods.

Regardless of which solution is chosen, in the end there should be no more upgrade methods that require registration domain defaults as input. The implementation of the method upgradeToRegistrationDomainDefaults: can then also be simplified to only support one type of upgrade method selector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant