MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Automatically suggest adding/removing remap=true on mixin-related annotations

Open JBYoshi opened this issue 7 years ago • 4 comments

Could you add a warning for mixin annotations when the remap value of an annotation doesn't match the obfuscation state of the target?

Relevant annotations I've found: @Mixin @Accessor @Invoker @Shadow @ModifyConstant @Inject @ModifyVariable @At @ModifyArg @ModifyArgs @Redirect

JBYoshi avatar Jul 04 '17 17:07 JBYoshi

This will also be added to @Overwrite in the future: https://github.com/SpongePowered/Mixin/issues/179#issuecomment-313033777

JBYoshi avatar Jul 05 '17 15:07 JBYoshi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 11 '18 02:02 stale[bot]

remap = true is the default.

This should be specific for targetting non-obfuscated targets, without remap = false.

DenWav avatar Feb 11 '18 03:02 DenWav

@DenWav From https://github.com/SpongePowered/Mixin/issues/551, annotations may still require an explicit remap=true in some cases even though it is the default.

A good first step for this would be to suppress the "default annotation value" warning and quick fix for the remap field, since it can be misleading. Then, we could work on re-adding an inspection explicitly for the remap that is aware of the unconventional context-sensitive behavior.

magneticflux- avatar Dec 31 '21 17:12 magneticflux-