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

Create an MRJ to set the classloader name #978

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

modmuss50
Copy link
Member

Sets the class loader name, this means stacktraces indicate what classloader a given class was loaded from.

Screenshot 2024-09-18 at 09 46 21

Questions:

  • What name should the classloader have? I chose fabric over knot as this will be seen by anyone looking at log files, knot is very much an internal name to loader, with little meaning.
  • Should it target java 9? I went with java 17 + to possibly reduce the number of MRJ versions we may need in the future

@@ -51,7 +51,7 @@ public void addURL(URL url) {
private final KnotClassDelegate<KnotClassLoader> delegate;

KnotClassLoader(boolean isDevelopment, EnvType envType, GameProvider provider) {
super(new DynamicURLClassLoader(new URL[0]));
super("knot", new DynamicURLClassLoader(new URL[0]));
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps something like 'fabric-knot' would be more clear.

It would be nice to encourage a naming convention that makes it clear which classloader is being specified, AND where it comes from.

Copy link
Contributor

@sfPlayer1 sfPlayer1 Oct 1, 2024

Choose a reason for hiding this comment

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

This is sort of a feature, calling it anything fabric would just mislead people with their mod issues, while the information itself is mostly useful and actionable for those that mostly tend to know what Knot is.

@modmuss50 modmuss50 merged commit 319c247 into FabricMC:master Oct 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants