Iris Shaders

Iris Shaders

36M Downloads

Consider using Brachyura as a replacement for Gradle + Fabric Loom

coderbot16 opened this issue ยท 4 comments

commented

Brachyura is a build tool created from the ground up to work for Minecraft modding. It is a Gradle + Fabric Loom replacement that aims to be efficient and allow the user to create fast and easy-to-debug build scripts.

While Gradle and Fabric Loom have been functional for Iris thus far, it's pretty obvious while using them that Gradle was never really designed to accommodate Minecraft modding. While it has improved in this respect more recently, we still have a number of day-to-day issues that come up.

More significantly, Gradle is incredibly complex software with many layers of abstraction and indirection, making it extremely challenging to debug. The practical implication of this is that even though both Gradle and Fabric Loom are open-source software, if issues come up we're entirely reliant on others to go in and fix these issues. Brachyura promises to address these issues by having a much more straighforward project organization, using conventional Java for buildscripts, and being focused around Minecraft modding instead of having modding being something tacked on to it with plugins.

Considerations:

  • JitPack will not recognize Brachyura by default (notably, Immersive Portals relies on Iris being available through JitPack), however we can create a configuration file to tell JitPack how to compile our project: https://github.com/jitpack/jitpack.io/blob/master/BUILDING.md#custom-commands
  • Brachyura won't be recognized by most IDEs by default, however, it will have the ability to generate project configuration files for most of the popular / relevant IDEs.
  • Brachyura is still in an early stage, so at the current stage of development it could end up causing more issues for us than Gradle + Fabric Loom. Hopefully these issues will go away, and the remaining ones will be simpler to debug and resolve.
  • While Brachyura does make most of its external dependencies very clear, its bootstrap phase does rely on a modder's personal maven server (maven.hydos.cf), and we would rather avoid relying on the personal maven servers of any modders due to poor experiences in the past. Generally, we prefer for our libraries to be available on Maven Central or a repository of similar reliability, or vendored into the Iris repository. This is now fixed.
commented

Needed first:

commented

We have a working branch (brachyura) and the development environment works pretty well! These are the current issues, in order of importance:

  • Critical: it looks like built JARs crash in prod (Reference map 'iris-sodium-compat-refmap.json' for mixins.iris.compat.sodium.json could not be read. If this is a development environment you can ignore this message)
  • Critical: runMinecraftClient also crashes (java.lang.IllegalArgumentException: The specified resource 'mixins.iris.compat.sodium.json' was invalid or could not be read)
  • Important: .idea/vcs.xml is deleted when running the idea import task CoolCrabs/brachyura#11
  • Important: Modrinth maven needs to fix their stuff and add hashes (in progress, they're working on it)
  • Nice-to-have: Buildscript.java has a lot of code related to multiple source sets that might be better placed in FabricProject
  • Nice-to-have: WARN: Unable to find byte.class should be fixed (very small annoyance in initial import)
  • Nice-to-have: Bootstrap does not trim / validate tab-separated elements when parsing brachyurabootstrapconf.txt: CoolCrabs/brachyura#12
commented

Those have all been resolved, and we are making use of a fixed fork of Brachyura. We'll be able to switch back to mainline if/when this is merged:

commented

Iris is now using Brachyura on the trunk branch. Goodbye, Gradle!