QuiltMC / quilt-loom

MIT License
22 stars 19 forks source link

Quilt loom 1.0+ gives interface injection errors with transitive deps #19

Closed lukebemish closed 1 year ago

lukebemish commented 2 years ago

First noticed this error while trying to add geckolib-quilt to a project. As my gradle setup is a bit unorthodox, I tried to reproduce this with the quilt template mod and found the following:

Quilt template mod with loom 1.+ - can set up environment fine (loading into IDE or from command line) Quilt template mod with loom 1.+ and geckolib-quilt - fails to load with the following log (from clean clone and edit as well):

./gradlew clean

> Configure project :
Quilt Loom: 1.0.3
Found existing cache lock file, rebuilding loom cache. This may have been caused by a failed or canceled build.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'quilt-template-mod'.
> Failed to setup Minecraft, java.lang.NullPointerException: Cannot invoke "net.fabricmc.loom.configuration.ModMetadataHelper$Metadata.getInjectedInterfaces()" because the return value of "net.fabricmc.loom.LoomGradleExtension.readMetadataFromJar(java.io.File)" is null

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s

Same, but disable transitive deps from geckolib-quilt - loads fine Same (transitive deps on again), but disable interface injection in loom block - loads fine

I suspect that this is an issue with quilt-loom specifically, not normal loom, as I could not reproduce it with normal loom: fabric-example-mod with loom 1.+ - loads fine The same with geckolib-fabric - loads fine

I will try to set up something locally to test it with something more simplistic than geckolib and see if I can't find the root cause of the issue if I have time later. If I had to guess, I'd suspect it has something to do with how transitive deps are pulled in on the various mod* configurations; I am unsure why I cannot reproduce it with normal loom, so more digging is required.

lukebemish commented 2 years ago

(May be resolved once #18 is merged, which I hadn't seen when I posted this)

TibiNonEst commented 2 years ago

18 has now been merged, please lmk if this issue has been fixed.

lukebemish commented 2 years ago

I won't be able to check for a week or so due to computer issues; if anyone else wants to try to reproduce it, feel free to close this

lukebemish commented 1 year ago

This seems to work fine on modern loom versions, so there's no reason to keep this open