SteamDeckHomebrew / decky-loader

A plugin loader for the Steam Deck.
https://decky.xyz
GNU General Public License v2.0
4.26k stars 154 forks source link

[Request] Plugin.uninstall callback function #536

Closed wheaney closed 3 months ago

wheaney commented 10 months ago

Please confirm

Feature Request Description

During uninstall, decky-loader calls stop() which triggers _unload(), but from my conversations in Discord, I can't rely on _unload() to be 1:1 with uninstall (i.e. it may be triggered at other times in the plugin lifecycle).

My plugin installs a systemd service when it's loaded, but since there's no reliable way to tap into decky's uninstall mechanism, a user uninstalling my plugin may be surprised to find that it's still operating behind the scenes.

This request is to add an uninstall function to the Plugin interface that is called after stop() and before deletion of the plugin directory.

Further Description

No response

wheaney commented 7 months ago

@PartyWumpus This is showing up as assigned to me in the SDH Tracker. I've implemented and tested this myself, so at this point I'm just waiting for reviews/testing. Should it be assigned to someone else (or unassigned)?

TrainDoctor commented 7 months ago

@wheaney we simply use assignment as a marker of who requested and or is working on a feature request etc.