sfPlayer1 / Matcher

Tool for tracking elements in obfuscated Java archives across releases
GNU General Public License v3.0
75 stars 41 forks source link

Matcher seems to lose params and javadoc info when moving members #17

Open liach opened 3 years ago

liach commented 3 years ago

Examples: https://github.com/FabricMC/yarn/commit/414cedb22f8cb477719f6e1789dfad04108d75fa#diff-73a11ecff5477b460d191d612ad8a47f4d1a7895673479fc8d79d4e6dd2d916bL211-L221 https://github.com/FabricMC/yarn/commit/414cedb22f8cb477719f6e1789dfad04108d75fa#r48954183

https://github.com/FabricMC/yarn/commit/252ad11d0a258a0603ef0a1b2fe5b31d8c913ccc#diff-90e8775ba246959b4310b4541dd3a9edc17c65742170117a0883d37f2362b6f0L3-L12 https://github.com/FabricMC/yarn/commit/252ad11d0a258a0603ef0a1b2fe5b31d8c913ccc#diff-75840641e62ae4fe1a1d946c90c20e28d53ed8f8b0d62ecd2134251e8f218917R2

NebelNidas commented 1 year ago

Can you still reproduce the issue with the latest commit? If yes, I'll look into it

liach commented 1 year ago

Hadn't worked on Minecraft since the chat report ban system was added.

You can try reproduce it yourself by:

  1. Find an update where, say, mojang moved out a method by elevating (e.g. the recent Loot table refactor, the resource refactor a while ago)
  2. In the base version, add parameter names and javadoc to the method to be eleveated
  3. Perform a match, and see if the resulting method keeps the parameters and javadocs

Fyi, in enigma format, params and javadocs are members of method entries. Maybe matcher forgets about these children entries when it moves methods.