Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The migrate mappings task should remap mixin strings #1035

Open
haykam821 opened this issue Feb 1, 2024 · 3 comments
Open

The migrate mappings task should remap mixin strings #1035

haykam821 opened this issue Feb 1, 2024 · 3 comments

Comments

@haykam821
Copy link
Contributor

If a method named ExampleClass.doSomething was renamed to doNewSomething, then the mixin would be remapped as such:

 public class ExampleClassMixin {
 	@Redirect(method = "doFullTask", at = @At(value = "INVOKE", target = "Lcom/developer/ExampleClass;doSomething(Z)V"))
 	public static void modifySomething(boolean value) {
 		if (GlobalCondition.condition()) {
 			return;
 		}
 
- 		ExampleClass.doSomething(!value);
+ 		ExampleClass.doNewSomething(!value);
 	}
 }

The method call will be migrated, but not the target of the mixin. Ideally, both would be migrated.

@SNWCreations
Copy link

I think this issue can be solved by using CadixDev/MercuryMixin.

@modmuss50
Copy link
Member

modmuss50 commented Feb 3, 2024

Yes, MM likely need updating to our mercury fork as well as looking into what CadixDev/MercuryMixin#18 means. Its been so long I have forgotten what this issue was about.

@SNWCreations
Copy link

Yes, MM likely need updating to our mercury fork as well as looking into what CadixDev/MercuryMixin#18 means. Its been so long I have forgotten what this issue was about.

I've read that, I think it wanted a method which is similar to Mercury#setGracefulClasspathChecks method,
it could prevent Mercury from being crashed even if the classpath is incomplete. But enabling this may produce some
wrong result in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants