Debugging with multiple shaded dependencies

By | October 30, 2018
Questions:

SpongeForge relocates com.typesafe.config to configurate.typesafe.config

Because Minecraft Forge packages a previous version, which we run alongside (and forge is what loads SpongeForge).

https://github.com/SpongePowered/SpongeForge/blob/stable-7/build.gradle#L115

API Consumers of SpongeAPI, do not get the shaded jar transitively, but do get the unshaded jar transitively.

Should SpongeAPI be passing on it’s shaded version of typesafe config instead?

Or should all API consumers somehow be responsible for relocating their own code without bundling typesafe config?

Error:

[23:30:52] [Server thread/ERROR] [Sponge]: Could not pass FMLServerStartedEvent to Plugin{id=configclash, name=configclash, version=1.0-SNAPSHOT, source=.\mods\configclash-1.0-SNAPSHOT.jar}
java.lang.NoSuchMethodError: ninja.leaping.configurate.hocon.HoconConfigurationLoader$Builder.getParseOptions()Lcom/typesafe/config/ConfigParseOptions;
        at au.id.rleach.configclash.Configclash.onServerStart(Configclash.java:25) ~[Configclash.class:?]
        at org.spongepowered.common.event.listener.GameStartedServerEventListener_Configclash_onServerStart1.handle(Unknown Source) ~[?:?]
        at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2705-7.1.0-BETA-3291]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:383) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3291]
        at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:420) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3291]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:404) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3291]
        at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:233) [SpongeImpl.class:1.12.2-2705-7.1.0-BETA-3291]
        at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:267) [SpongeMod.class:1.12.2-2705-7.1.0-BETA-3291]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
        at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
        at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
        at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) [LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) [LoadController.class:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
        at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
        at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
        at net.minecraftforge.fml.common.LoadController.redirect$onPost$zza000(LoadController.java:560) [LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?]
        at net.minecraftforge.fml.common.Loader.serverStarted(Loader.java:807) [Loader.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.handleServerStarted(FMLCommonHandler.java:301) [FMLCommonHandler.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:488) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *