revanced-patcher
revanced-patcher copied to clipboard
feat: Required minimum patcher version annotation or JSON export
Type
Functionality
Issue
Too many people fail to update Manager, and then they wonder why it's throwing class not found exceptions during patching.
Feature
Create a minimum patcher version annotation that is applied to patches (apply it to some core patch such as integrations patch).
Or alternatively export something in the patches.json that indicates the minimum patcher version that is required to use the patches.
Then when a breaking patcher change is introduced, update the patches required minimum patcher field.
Then if Manager/CLI tries to patch and it's below the minimum patcher version, throw an error explaining to update.
Motivation
Help users who get so lost when they neglect updating Manager.
Additional context
No response
Acknowledgements
- [X] I have searched the existing issues and this is a new and no duplicate or related to another open issue.
- [X] I have written a short but informative title.
- [X] I filled out all of the requested information in this issue properly.
I think this can be achieved without the help of ReVanced Patcher. The build system can add the version of ReVanced Patcher used to compile patches into the jar file as a resource.
Although PatchBundleLoader may want to be aware of it
Whatever way that works, sure. The point is to prevent patching and give feedback if the user has an outdated patcher.
This was previously an issue with breaking API changes. Currently, we handle this with more care and deprecation which will mitigate the issue in combination with ReVanced Manager showing a popup if an update is present. This could be enough to close the issue.