FabricMC / fabric-loom

Gradle build system plugin used to automate the setup of a minecraft mod development environment.
MIT License
221 stars 193 forks source link

RemapJar task fails with an unhelpful error when a mixin json file is malformed. #1103

Closed TaxMachine closed 2 months ago

TaxMachine commented 2 months ago

When I build a 1.20.1 mod I get this error from the :remapJar task

Execution failed for task ':remapJar'.
> A failure occurred while executing net.fabricmc.loom.task.RemapJarTask$RemapAction
   > Failed to remap, com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 30 column 4 path $.injectors.defaultRequire

The mod uses fabric-loom 1.2-SNAPSHOT I have no idea if this is a fabric or an issue with the mod but there's no error in the codebase

modmuss50 commented 2 months ago

it appears that one of your mixin json files might be invalid.

TaxMachine commented 2 months ago

you're right thank you. Is there a way to make those errors more readable? I don't know how it catches those errors but It'd be nice to have improved logging on this side

modmuss50 commented 2 months ago

Yeah, that should be possible, lets keep this issue around to look into improving this 👍