svengeance / Husky

Modernizing the way developers think about installers
3 stars 0 forks source link

[Feature] Revamp Uninstall Approach #29

Closed svengeance closed 3 years ago

svengeance commented 3 years ago

Context

The current approach to uninstall is overly complex and largely unnecessary. It has each task directly responsible for undoing that task's changes. In the long run, this coupling will prove to be untenable and likely cause more headache and boilerplate than it's worth.

Proposals

Separate entirely the uninstall from the install tasks. During the course of installation, Husky should make note whenever a reversible action (file written, folder moved, file-extension registered, etc..) is done. The uninstall process will simply iterate over these notes and undo them. The added benefit here is that we can be extremely explicit about what is proposed to be uninstalled. This disconnected approach also in extremely well to application updates, where future updates introducing more files can simply append to this list.

This serialized uninstall-data file will be stored in the application's root directory. A simple serialization and compression should prevent it from being tampered with inadvertently.

Interested Users

Husky Developers

svengeance commented 3 years ago

This refactoring should keep in mind and resolve #28