fix(Strava): Fix Overwrite media upload parameters patch#6491
Draft
xehpuk wants to merge 1 commit intoReVanced:devfrom
Draft
fix(Strava): Fix Overwrite media upload parameters patch#6491xehpuk wants to merge 1 commit intoReVanced:devfrom
Overwrite media upload parameters patch#6491xehpuk wants to merge 1 commit intoReVanced:devfrom
Conversation
Contributor
Author
|
I guess I found the source of the Kotlin version: https://github.com/ReVanced/revanced-patches-gradle-plugin/blob/2597efe/gradle/libs.versions.toml#L2 |
Member
|
Yes, I am currently in the process of migrating to context parameters with patcher v22. Theres a couple cross dependencies going on here. Once patcher v22 is released the gradle plugin will update to it alongside with context params. |
Contributor
Author
|
Will the migration happen before the next patches release? If not, this patch needs to be disabled or temporarily fixed via e.g. #6492. |
Member
|
Possibly, will keep in mind. |
Member
|
@xehpuk #6510 (comment) this may also be related to the return helper functions, does this PR fix that? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
returnEarlyandreturnLatefails when the patched method should returnlongordouble(or their boxed types) while it has fewer than two registers.This PR takes this into account by creating a helper method with sufficient registers and calling it from the original method.
A
BytecodePatchContextis needed for method creation. To keep it optional (because this isn't needed in most cases), context receivers are replaced by context parameters, since nullable context receivers can't be accessed in extension methods (thisis shadowed).Context parameters are available from Kotlin v2.2 and I have no idea how to update. Hence the draft status.
Info about the feature: