architectury / architectury-loom

A Gradle plugin to setup environments for Fabric, Forge, NeoForge and Quilt modding.
https://docs.architectury.dev/loom/introduction
MIT License
115 stars 41 forks source link

No Class Definition Found Error when depending on a mod with JIJ #236

Open gamma-delta opened 2 months ago

gamma-delta commented 2 months ago

I have a library mod, PAUCAL, that uses Architectury and bundles Jankson, using the include config. The jars that it produce work in a runtime environment.

However, I'm trying to depend on PAUCAL in another mod I'm working on. At runtime, I'm getting a NoClassDefFoundError: blue/endless/jankson/Jankson. (Logs are attached here: https://mclo.gs/ghyaCtO)

The issue was mentioned in (sigh) this Discord post in the Architectury discord server; including Jankson directly does fix the problem. However this seems really error-prone and awful to have to sync dependencies across two projects, and the whole point of Jar-in-Jar is to not have to worry about this kind of thing.

So, I would like it if depending on something with a jar-in-jar could properly access the JiJ-ed stuff. (@object-Object managed to fix this at some point but she can't figure out how, so if there is an intended way to fix this, that would be nice to know either.)

wagyourtail commented 2 months ago

Publish to a maven so theres a proper dependencies list in the metadata, instead of using the modrinth or curseforge one.

Iirc there also used to be a way to just extract nested jars in loom, but im not seeing that on the fabric wiki, so maybe upstream removed it

gamma-delta commented 2 months ago

I am.

On Fri, Sep 6, 2024 at 6:16 AM William Gray @.***> wrote:

Publish to a maven so theres a proper dependencies list in the metadata, instead of using the modrinth or curseforge one.

— Reply to this email directly, view it on GitHub https://github.com/architectury/architectury-loom/issues/236#issuecomment-2333832764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHD6LUUXEEFKGQYM5BCYS5TZVGFIXAVCNFSM6AAAAABNPOMZSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTHAZTENZWGQ . You are receiving this because you authored the thread.Message ID: @.***>

wagyourtail commented 2 months ago

How, i dont see any publish blocks in its build gradle