Fix failure to recompute frames in mixins involving mixin-generated classes in stack frames - #435
Open
lukebemish wants to merge 4 commits into
Open
Fix failure to recompute frames in mixins involving mixin-generated classes in stack frames#435lukebemish wants to merge 4 commits into
lukebemish wants to merge 4 commits into
Conversation
Last commit published: b0f19ccdef7badb7f40625d9f34c07397ac5f5b0 - version: PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name = "Maven for PR #435" // https://github.com/neoforged/FancyModLoader/pull/435
url = uri("https://prmaven.neoforged.net/FancyModLoader/pr435")
content {
includeModule("net.neoforged.fancymodloader", "earlydisplay")
includeModule("net.neoforged.fancymodloader", "junit-fml")
includeModule("net.neoforged.fancymodloader", "loader")
}
}
} |
lukebemish
marked this pull request as draft
July 31, 2026 04:28
Contributor
Author
|
This PR also includes a test replicating #434; this test will fail without the changes from this PR. |
lukebemish
marked this pull request as ready for review
July 31, 2026 04:31
Su5eD
approved these changes
Jul 31, 2026
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.
Fixes #434
In certain scenarios frame recomputation of Mixin classes needs to see the superclass of a class mixin generates. However, mixin-generated classes (as well as normal mixin classes) themselves may need frame computation, so that transform cannot be placed before
neoforge:computing_frames! (Basically, a given class processor can either have the ability to have its changes be counted for frame computing, or can request computing itself. This is to avoid circularity).I fix this through a few changes:
neoforge:mixin_frame_context, responsible for making any mixin changes that will affect frame computationneoforge:mixin_frame_contextrunsgenerateClasson classes-to-be-generated on a copy of the received class node, then copies over any changes in super type to the actual classnode.This occurs beforeneoforge:computing_framesneoforge:mixinrunsgenerateClassto properly generate the class normally, later, as before.Basically: I apply the changes in super type earlier by re-running the generator. Generators are safe to re-run -- FML already did that in
FMLClassBytecodeProvider. The capture point has to be moved earlier because generators could request stuff from the mixin service, including looking up class info; I suspect this will not have any interesting effects in practice.