Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to mapping-io (Glitch's Version) #432

Merged
merged 10 commits into from
Oct 9, 2024
Merged

Port to mapping-io (Glitch's Version) #432

merged 10 commits into from
Oct 9, 2024

Conversation

TheGlitch76
Copy link
Member

@TheGlitch76 TheGlitch76 commented May 20, 2024

This is step 0 in adding the ability for Loader to use alternative intermediates for mods, or use something like mojmaps at runtime. This PR migrates the pre-existing MappingConfiguration to use mapping-io, but doesn't do much to actually refactor Loader to take advantage of mapping-io's strengths.

This PR moves a few dependencies to be shadowed that Floader moved as well. Tiny Remapper was required to be moved to work with mapping-io, tiny mapping parser was removed by upstream, and I just decided to bring AccessWidener in line with upstream as well.

(PS: I know QMT exists-ish, but it's not finished and I want to work on a modloader, not a mappings parser. When and if QMT is finished, we can evaluate migrating to it, but the potential to use a first-party library later shouldn't prevent us from improving Loader today)

This is step 0 in adding the ability for Loader to use alternative intermediates for mods, or use something like mojmaps at runtime. This commit migrates the pre-existing MappingConfiguration to use mapping-io, but doesn't do much to actually refactor Loader to take advantage of mapping-io's strengths.

This PR moves a few dependencies to be shadowed that Floader moved as well. Tiny Remapper was required to be moved to work with mapping-io, tiny mapping parser was removed by upstream, and I just decided to bring AccessWidener in line with upstream as well.

(PS: I know QMT exists-ish, but it's not finished and I want to work on a modloader, not a mappings parser. When and if QMT is finished, we can evaluate migrating to it, but the potential to use a first-party library later shouldn't prevent us from improving Loader today)
TR eagerly opens nested ZIP files and flattens them, and this slightly bizarre behavior
causes lots of issues when trying to remap mods that include JiJ candidates. To mitigate this,
we create a read-only view of *only* the `.class` files. This has minimal memory impact as the
FS is copy-on-write, so it is just a big map of file paths.
@TheGlitch76 TheGlitch76 marked this pull request as ready for review May 20, 2024 17:56
@TheGlitch76 TheGlitch76 requested a review from AlexIIL May 20, 2024 17:56
Proguard is magically adding SequencedCollection to the LVT of MemoryMappingTree.accept
in mapping-io. We couldn't find a minimal reproduction, so we're just going to move away from
it for now.
…ing the remapper to crash because the mod directory didn't exist.

Also comment out the DedicatedServerOnly annotation on TestMixinGuiHelper, because we're not testing package-stripping annotations any more. This allows us to run the test mod.
Copy link
Contributor

@AlexIIL AlexIIL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now that I've pushed three small fixes!

I'm not that happy with removing/hiding libraries (as this breaks a few older mods) but I'll look into if we can fix them later, as I don't want that to prevent this from being merged.

# Conflicts:
#	src/main/java/org/quiltmc/loader/impl/launch/common/MappingConfiguration.java
@ix0rai ix0rai added the enhancement new feature or improvement label Oct 9, 2024
@TheGlitch76 TheGlitch76 merged commit fe82575 into develop Oct 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants