Repository navigation
Report fatal mixin apply errors on Fabric with the correct mod - #204
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #203
On Fabric,
FabricMixinProblemmatched anyCaused by: ... from mod Xline after aMixinTransformerError, with(?:.*\n)*jumping to the last such line and[^ ,]+as the mod ID.When Mixin writes context directly after the ID (
from mod enhanced_storage->@Inject::...), the mod name became the whole method descriptor, including the next line break.Mixin errors in the PREPARE phase, which have no
MixinTransformerError, were not detected on Fabric at all.This PR adds
FabricMixinApplyProblem, which reusesMixinApplyProblemfrom Forge and NeoForge and reads the mod ID from theMixinApplyErrorline.FabricMixinProblemnow only checks the direct cause of theMixinTransformerError, skips it when that cause is aMixinApplyError, and reads the mod ID as[\w-]+.That keeps causes like
InjectionError ... from mod expandabilityand avoids reporting the same crash twice.FabricMixinApplyProblemis a subclass instead of registeringMixinApplyProblemdirectly, because a mixin that loads a client-only class on a server is already reported byFabricClientOnlyModProblem.The subclass adds the same client-only lookahead that
FabricEntryStageProblemuses, sofabric-client-only-mixin.logstill reports only the client-only mod.For that, the pattern of
MixinApplyProblemmoved into theMIXIN_APPLY_ERRORconstant.Not covered:
FabricEntryStageProblemstill blames the mod whose entrypoint loaded the class (rrvin the new test log), next to the mixin problemChanges
FabricMixinApplyProblemand register it inFabricAnalyserFabricMixinProblemto the direct cause of theMixinTransformerErrorand stop the mod ID at->,]and line breaksMixinApplyProbleminto theMIXIN_APPLY_ERRORconstantfabric-mixin-apply-error-invalid-descriptor.logandfabric-mixin-apply-error.log