fabric-loom
fabric-loom copied to clipboard
Print warning if `archivesBaseName` is not set, or is set to 'fabric'
I've been having some fun tracking down a really weird conflict between one of my mods and another called Chunky.
It turns out the issue was caused by both mods using a multi-module layout (and calling their Fabric module 'fabric'
) and not explicitly setting the Gradle archivesBaseName
property.
Loom uses this property to determine the name of the Mixin refmap file.. Obviously, two mods using a refmap file with the same name equals a bad time at runtime 😆
https://github.com/FabricMC/fabric-loom/blob/8e424f3f50e36b2eae5c7b501d159b2b8b6eac54/src/main/java/net/fabricmc/loom/LoomGradleExtension.java#L299-L301
At least for me, this INFO message was not visible when building in IntelliJ
I wonder whether it may be worth printing a message at a higher level (WARN or whatever) if the property is set to fabric
?
relevant issue: https://github.com/lucko/LuckPerms/issues/2880
perhaps a "better" solution would be to append 4-6 random base64 characters to the end of a refmap? if anybody needs to get at the refmap they should be parsing the fabric.mod.json anyway
I think the real soltuion here is having some better errors around conflicting refmap names
Ah, the irony. I PR'd the use of archivesBaseName
because people weren't setting their projects' names (and with jitpack they get auto-inferred to build
or something like that). This is round 2 :smile: