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

Remove redundant locators and clean-up leftover pre-modules code #118

Merged
merged 4 commits into from
Dec 26, 2023

Conversation

Su5eD
Copy link
Member

@Su5eD Su5eD commented Oct 1, 2023

Cleans up leftover code from before the module era that is no longer functional in modern modlauncher versions which make use of modules.

The reason for skipping a deprecation phase is that said code is no longer used by modlauncher itself and does nothing on its own, whereas deprecated code would still be considered functional. There is no reason for us to keep this code. It's outdated and should be removed immediately to avoid confusing users.

Additional class/resource locators

Removes 2 unused locator methods in ITransformationService:

  • additionalClassesLocator
  • additionalResourcesLocator

These methods have not had any effect since modlauncher 9+. With the module system in place, all classes and resources must be associated with a source module, and thus anonymous providers are no longer viable. Instead, modders are encouraged to use the scan callback methods (beginScanning, completeScan) to load additional jars at runtime.

TransformingClassLoaderBuilder

The TransformingClassLoaderBuilder class was previously used to create a customized classloader instance with extra transformable paths or a class byte provider function. Both of these are no longer used by modlauncher, as the module layers are immutable and cannot be expanded. The transforming class loader pulls all of its data from the GAME module layer.

Fixes #89
Fixes #111

@Technici4n
Copy link

I think this is a great initiative. We can always bump the major version if we are afraid of this breaking change.

Copy link

@Technici4n Technici4n left a comment

Choose a reason for hiding this comment

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

This is good and will indeed not break anything.

@Technici4n Technici4n added clean-up An issue or pull requests which deals with cleaning up the code breaking-change Indicates that the Pull Request or Issue is a breaking change labels Nov 12, 2023
@Matyrobbrt Matyrobbrt changed the title Remove redundant locators Remove redundant locators and clean-up leftover pre-modules code Dec 25, 2023
@marchermans marchermans merged commit 26f7226 into McModLauncher:main Dec 26, 2023
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates that the Pull Request or Issue is a breaking change clean-up An issue or pull requests which deals with cleaning up the code
Projects
None yet
3 participants