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

Allowed the (knot) launcher to give the intended namespace #435

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from

Conversation

coolGi69
Copy link
Contributor

Adds a getFinalNamespace() to the QuiltLauncher allowing the knot to provide other namespaces outside of intermediary to be used.
Currently, the access widener's namespace preference is hardcoded as intermediary within the RuntimeModRemapper, but with this change the value is now gotten from the launcher.

This PR also makes several functions and classes for the knot class loaders public, allowing for the creation of other knots.

@coolGi69
Copy link
Contributor Author

coolGi69 commented May 30, 2024

I think a good idea is to move the namespace stuff that I previously moved into the game provider to the launcher. (Less duplicated code)
I'll implement that tomorrow, so don't merge this yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why making this public?

Choose a reason for hiding this comment

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

allowing for the creation of other knots

EnnuiL and others added 10 commits August 17, 2024 00:07
* Added support for 1.21.2 in McVersionLookup

* Update minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/McVersionLookup.java

Co-authored-by: modmuss <modmuss50@gmail.com>

---------

Co-authored-by: modmuss <modmuss50@gmail.com>
(cherry picked from commit 991d38d8a62e89f00aa3038b52f428f95b7d44bc)
This should work as a fix for now
@coolGi69
Copy link
Contributor Author

Nvm, I don't see what past me in #435 (comment) wanted to change.
Sorry for the long open time, I was on a bit of a development hiatus.

I'll double-check this commit has no issues and report back on its status in a few minutes.

@coolGi69
Copy link
Contributor Author

Should be ready to be reviewed/merged now.

Note: I'm not sure if you'd prefer to revert 89b42d3, but it will make it so that other knots can just build off the base knot, and don't have to re-implement everything.
If it is accepted, then many of the things that are made public here can be turned back to private as they no longer have to be implemented by other peoples knots.

@ix0rai ix0rai added the enhancement New feature or request label Oct 9, 2024
TheGlitch76 and others added 8 commits October 8, 2024 19:50
* Port to mapping-io (Glitch's Version)

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)

* Fix "duplicate class" spam from Tiny Remapper in RuntimeModRemapper

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.

* Update actions for Java 21

* Update actions for Java 21 take 2

* Mount instead of CoW

* Remove Proguard

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.

* Fix mods that need remapping, but don't contain any class files, causing 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.

* Mount temporary files as READ_ONLY

---------

Co-authored-by: AlexIIL <alexj9@me.com>
Co-authored-by: AlexIIL <AlexIIL@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants