Migrate to official mappings#2311
Merged
jellysquid3 merged 1 commit intoFeb 8, 2024
Merged
Conversation
Contributor
Author
|
Mixins have been validated using the following procedure:
Credit to @IThundxr for suggesting this approach. |
jellysquid3
approved these changes
Feb 3, 2024
jellysquid3
left a comment
Member
There was a problem hiding this comment.
Verified that everything is remapped correctly, including mixins.
Member
Contributor
Author
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Goal
This PR migrates the Sodium codebase to use official mappings. The remapping was largely automated using Mercury & MercuryMixin, with some manual fixups afterwards to fix compile errors. As such, imports may have been shuffled around compared to trunk.
This work resolves #2277.
Renaming Sodium classes to use Mojmap-inspired names is not planned for this PR, as it's a separate job from compiling against Mojmap. Such renames would greatly complicate verifying correctness of the remapping (see below).
Testing
I have decompiled a built JAR from this commit and 0.5.8. All mod classes (that is, any non-
@Mixinclass) produce identical source files exceptNativeImageHelper(which is only different due to an accessor method name changing). Thus, extra manual verification should not be required for any of these.Unfortunately, it appears that unlike Architectury's toolchain, Fabric Loom emits mapped names into mixin annotations. This means that all of the mixin classes have different bytecode, and my decompilation trick does not work to verify them. What I can say is that the mod appears completely functional in dev, so I am doubtful that there are any incorrectly remapped mixins.