Wesley1808 / ServerCore

A mod that aims to optimize the minecraft server.
75 stars 11 forks source link

ServerCore should use JarInJar #74

Closed NullOrNaN closed 12 months ago

NullOrNaN commented 1 year ago

Describe the bug Your jar is shading other jars and allowing conflicts with other mods. We've mostly had problems with our custom mods using JarInJar as you are not.

Reproduce Use any mod that has a different version of library from you.

Expected behavior Shouldn't conflict and not try to boot.

Versions -Latest is not a version! ServerCore: 1.3.7 Minecraft: 1.20.1 (Forge)

Mod incompatibilities chunky

I may try to tackle this myself and submit you a PR if I get time. We would love to use your mod, however, it's hard to with the fact of how you're shading.

Wesley1808 commented 1 year ago

Are you sure its ServerCore causing this issue? All the shaded libraries are relocated to sc_libs.* to prevent library collisions like this. You also wrote down chunky as a mod incompatibility, but I personally don't have any issues running both of the mods together (on both forge and fabric). If so, do you have any crash reports or logs? That might help.

Regarding #75, I'm not against removing shading where possible - but where you did it isn't. I already tried using adventure text as JiJ but that doesn't work, as it has transitive dependencies. Its a miracle that the game boots at all, but anything using adventure text is completely broken (/sc status for example).

You also removed MixinExtras as a Jar in Jar (I'm not sure why?), causing half of the mods functionality to silently break and some features being left half implemented, which is guaranteed to cause issues with ingame behavior.

Essentially, that commit completely removes MixinExtras and Adventure text from the mod jar in production (whilst leaving nightconfig shaded - if you removed that it would probably crash on startup).

NullOrNaN commented 1 year ago

I'm sure ServerCore is causing the issue. It has different MixinExtras from the rest of the mods trying to use it.It will either need to be relocated or use Jar in Jar. The command output and everything are working fine for me and were tested. I can do more testing.

As for the MixinExtras being removed as Jar in Jar that might have been a mistake, but the mod is working as expected on my side.

Wesley1808 commented 1 year ago

MixinExtras should already be using Jar in Jar here. Thats what include is for, anyway - and it shows up as JiJ inside the servercore jar file aswell. So thats confusing me a bit.

If the mod is working as expected, have you tried also running it in production environment? The way you set it up it should theoretically still all be available in dev environment, but its removed from prod.

If possible any error reports about this issue would still be appreciated, so I have a better idea of what to look for.

NullOrNaN commented 1 year ago

Ran it in production, and you're right /sc status wasn't working anymore. It's weird it worked in dev. I'll try to get you a crash log from it not booting with a few other mods. It's complaining about the different versions of MixinExtras.

NullOrNaN commented 12 months ago

Here is the MClo.gs from one of the issues. It's conflicting Adventure with the other mods in ATM9. This is straight off CurseForge for your mod.

Wesley1808 commented 12 months ago

The issue in the provided log file should be fixed with commit https://github.com/Wesley1808/ServerCore/commit/3dd2acbf2ae70fea41a94caaba2b4ff0b5ea4170 If you still run into issues with MixinExtras, please let me know.

NullOrNaN commented 12 months ago

Doing some extra testing now but won't be able to fully test till after next planned reboots.

NullOrNaN commented 12 months ago

Not seeing any issues! Thank you!