FabricMC / fabric-loader

Fabric's mostly-version-independent mod loader.
Apache License 2.0
632 stars 271 forks source link

Improve error blame when a mixin cannot be found #998

Open Qendolin opened 2 weeks ago

Qendolin commented 2 weeks ago

In this case it looks like better-clouds is causing a crash, when actually morenemoswoodcuttervariants is at fault by providing an invalid name/path in it's mixins.json. image

Since most users only read the first error (if at all), they would blame the wrong mod for the crash. In cases like these, where an error occurs during Mixin loading (not transformation), the error message could be improved by inspecting the exception cause chain.

Mods used in example:

sfPlayer1 commented 2 weeks ago

This happens because Mixin initializes when it is asked to transform the first class.

We may be able to trigger this explicitly (by calling select directly), before running preLaunch, but I'm not sure this is safe to do.