lra / mackup

Keep your application settings in sync (OS X/Linux)
GNU General Public License v3.0
14.6k stars 932 forks source link

Mackup app config files should be version independent? #1440

Closed captnswing closed 2 months ago

captnswing commented 5 years ago

I notice two different paradigms for the config files currently in the mackup/applications folder. Sometimes several config files exist for different app versions. E.g.

Sometimes, one mackup app config file supports several versions of the app simultaneously. E.g.

...I think it would be great with the latter approach (one app config file for several versions).

This could be easier if the ini files supported wildcards in them, e.g.

Library/Preferences/com.sublimetext.*.plist could catch several versions of Sublime Text, and Library/Application Support/IntelliJIdea* would catch the App Support files for several IntelliJ versions

captnswing commented 5 years ago

thinking about how this could be implemented, e.g. by introducing a deprecated subdirectory in the applications folder. Then e.g. moving sublime-text-3.cfg and sublime-text-2.cfg to the deprecated directory and introducing an applications/sublime-text.cfg in their place.

The mackup program could be changed to emit warnings and migration instructions when config files in the deprecated folder are found in a mackup.cfg

lra commented 4 years ago

Yeah, the multiple versions is an issue. On homebrew this is handled with a version stanza, e.g. python and python@3.

Adding optional versioning for each application is the way to go longterm. No need to have different folders, we could add versioning the the files listed in each application, e.g.:

[v1]
file1

[v2]
file2

(not suggesting it, just an example).

This would also solve the upgrade problem, where upgrading mackup ditches the old state of applications supported before, which makes it impossible to upgrade cleanly as the new version can't know about old files with the current system.

semkagtn commented 4 years ago

Please, check: https://github.com/lra/mackup/pull/1581

jneuendorf commented 2 years ago

Issue #949 seems to be related as well