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

Shading reobf artifacts into userdev project jar results in issues from double remapping #150

Open
DaRacci opened this issue Apr 15, 2022 · 1 comment

Comments

@DaRacci
Copy link

DaRacci commented Apr 15, 2022

When using the commandAPI shade dep the reobfJar task changes the class import of ResourceManager to IResourceManager.
The source of the class: https://github.com/JorelAli/CommandAPI/blob/master/CommandAPI/commandapi-1.18.2/src/main/java/dev/jorel/commandapi/nms/NMS_1_18_R2.java
I believe this might have something to do with that plugin being complied with the spigot nms maps.

See the two attached classes for the non reobf and then the broken reobf.
https://drive.google.com/drive/folders/1ev7YNMG7I1vG3IqkmI2iZEmTWtivNVpu?usp=sharing

@jpenilla
Copy link
Member

You're shading something which is already reobfed into your jar which is being reobfed - this will cause issues as some Spigot names match Mojang names but for different classes. This can cause things to be double-remapped to nonsense.

Ideally, you should depend on the Mojang mapped version of any internals-accessing dependency that you shade. Alternatively, you can have a separate subproject that shades your internals module (already reobfed) and the CommandAPI reobf artifact.

Long-term it would be nice to have a better mechanism to handle legacy artifacts like this, but it's not at all a simple issue, so the aforementioned solutions will have to do for the foreseeable future.

@jpenilla jpenilla changed the title Remapping issue Shading reobf artifacts into userdev project jar results in issues from double remapping Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants