Infinidoge / nix-minecraft

An attempt to better support Minecraft-related content for the Nix ecosystem
MIT License
245 stars 26 forks source link

Classpath broken on Fabric #65

Open otomir23 opened 4 months ago

otomir23 commented 4 months ago

Looks like https://github.com/Infinidoge/nix-minecraft/commit/fa037f484d8775119a5e4fb3f20aaec15c19c118 makes Fabric Loader have two instances on the classpath at once, which is an illegal state. The server fails to start.

Stack trace for reference (fabric-1.20.1-0.15.11) ``` java.lang.IllegalStateException: trying to load net.fabricmc.loader.impl.FabricLoaderImpl from target class loader at net.fabricmc.loader.impl.util.LoaderUtil.verifyNotInTargetCl(LoaderUtil.java:55) ~[16h8ywfxn9dhw6mci6cz40yglyvp456r-fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.(FabricLoaderImpl.java:619) ~[16h8ywfxn9dhw6mci6cz40yglyvp456r-fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.api.FabricLoader.getInstance(FabricLoader.java:42) ~[16h8ywfxn9dhw6mci6cz40yglyvp456r-fabric-loader-0.15.11.jar:?] at net.minecraft.class_6396.mdf82ea6$fabric-crash-report-info-v1$lambda$fillSystemDetails$0$1(class_6396.java:544) ~[server-intermediary.jar:?] at net.minecraft.class_6396.method_37123(class_6396.java:66) ~[server-intermediary.jar:?] at net.minecraft.class_6396.handler$zzm000$fabric-crash-report-info-v1$fillSystemDetails(class_6396.java:541) ~[server-intermediary.jar:?] at net.minecraft.class_6396.(class_6396.java:58) ~[server-intermediary.jar:?] at net.minecraft.class_128.(class_128.java:34) ~[server-intermediary.jar:?] at net.minecraft.class_128.method_24305(class_128.java:274) ~[server-intermediary.jar:?] at net.minecraft.server.Main.main(Main.java:102) ~[server-intermediary.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[16h8ywfxn9dhw6mci6cz40yglyvp456r-fabric-loader-0.15.11.jar:?] ... 3 more ```
Infinidoge commented 4 months ago

Hmm. I thought that was one I explicitly tested, but nope it's broken, pain!

Reverted the commit for now, will do more testing.