Col-E / Recaf

The modern Java bytecode editor
https://recaf.coley.software
MIT License
6.02k stars 465 forks source link

Making it possible for vineflower and fernflower and forgeflower to coexist #866

Closed meiMingle closed 1 week ago

meiMingle commented 1 week ago

Feature_Name

Use the Relocating Packagesg function of the com.github.johnrengelman.shadow plugin to process the decompiler class library. This can theoretically allow vineflower and fernflower and other similar decompilers to coexist in Recaf. This has the following benefits: ① Recaf users can get more compiler results as references ② Vineflower and fernflower and other similar decompilers developers can compare the differences between their decompilation results, promoting the update and iteration of decompilers

Col-E commented 1 week ago

The issue is compiling against both. They both share the same names, so even if we add the dependency for both on the classpath, shadow will just map both of them to whatever is being shaded since it cannot tell the difference.

meiMingle commented 1 week ago

This may be of reference value https://github.com/Earthcomputer/class-file-indexer/blob/main/build.gradle.kts

meiMingle commented 1 day ago

I think it makes sense to do this, and I will work hard on it. At present, I have completed some work and realized the coexistence of fernflower, vineflower, and forgeflower libraries. The next step is to implement 'AbstractJvmDecompilerandBaseDecompilerConfig` for fernflower and forgeflower. Wait for my good news! !