FancyModLoader icon indicating copy to clipboard operation
FancyModLoader copied to clipboard

Fix: no modid is logged when "Failed to validate feature bounds"

Open Viola-Siemens opened this issue 8 months ago • 6 comments

Currently, FML can not output which mod causes Failed to validate feature bounds. The only logged information is the address of the mod info:

image latest_before.log

After this PR:

image latest.log

Viola-Siemens avatar Apr 07 '25 14:04 Viola-Siemens

  • [ ] Publish PR to GitHub Packages

Btw I cannot run the workflow in my repo so I have to draft the PR first to check if the code is working.

Viola-Siemens avatar Apr 07 '25 14:04 Viola-Siemens

@Viola-Siemens, this PR introduces breaking changes. Fortunately, this project is currently accepting breaking changes, but if they are not intentional, please revert them. Last checked commit: c0cced979e356aee5aa54c3f02bf6b022e0b0347.

loader (:loader)

  • net/neoforged/neoforgespi/language/IModInfo
    • visualizedInfo()Ljava/lang/String;: ❗ Method was made abstract

Thanks for your PR, but the logging should be based on the mod-loading issues that are created a few lines below. They have a suitable toString() method meaning they can just be used as logging arguments as-is.

shartte avatar Apr 07 '25 15:04 shartte

Thanks for your PR, but the logging should be based on the mod-loading issues that are created a few lines below. They have a suitable toString() method meaning they can just be used as logging arguments as-is.

Thanks for explaining. The key problem is that modInfo is not serializable. And also I don't know whether any other places use toString() method for other uses and modifying toString() method could cause trouble or not. If it's fine, I'll change visualizedInfo into toString and remove changes from ModLoader and Bound.

Additionally, I think this change is necessary because the fml crash report may sometimes be replaced by client crash report when some special mods are installed, which makes it harder to debug.

Viola-Siemens avatar Apr 07 '25 15:04 Viola-Siemens

Thanks for your PR, but the logging should be based on the mod-loading issues that are created a few lines below. They have a suitable toString() method meaning they can just be used as logging arguments as-is.

Thanks for explaining. The key problem is that modInfo is not serializable. And also I don't know whether any other places use toString() method for other uses and modifying toString() method could cause trouble or not. If it's fine, I'll change visualizedInfo into toString and remove changes from ModLoader and Bound.

Additionally, I think this change is necessary because the fml crash report may sometimes be replaced by client crash report when some special mods are installed, which makes it harder to debug.

No do not add toString. The objects created here are loggable: https://github.com/neoforged/FancyModLoader/pull/271/files#diff-9914431dd9553763e9c8f2317049e1c5271658133a2d804942e63b693c4de0d3R119

shartte avatar Apr 07 '25 15:04 shartte

@Viola-Siemens, this pull request has conflicts, please resolve them for this PR to move forward.