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

Allow multiple copies of a class on the CP and pick the JAR containing the first. #169

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shartte
Copy link
Contributor

@shartte shartte commented Jun 24, 2024

This allows unusual setups where through cross-project or cross-source-set dependencies, IDEs put MC on the classpath multiple times.

@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jun 24, 2024

  • Publish PR to GitHub Packages

Last commit published: 5e864b1e2d7c7463e105fb621621c18d1d17b296.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #169' // https://github.com/neoforged/FancyModLoader/pull/169
        url 'https://prmaven.neoforged.net/FancyModLoader/pr169'
        content {
            includeModule('net.neoforged.fancymodloader', 'earlydisplay')
            includeModule('net.neoforged.fancymodloader', 'junit-fml')
            includeModule('net.neoforged.fancymodloader', 'loader')
        }
    }
}

Copy link
Member

@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.

I'd prefer the MC jar override to be manual via a system prop. Is that unreasonable? That would better match NG's logic.

@shartte
Copy link
Contributor Author

shartte commented Jun 24, 2024

I'd prefer the MC jar override to be manual via a system prop. Is that unreasonable? That would better match NG's logic.

As I already told you on Discord, no system properties: It's a pain in the ass to actually set those for JUnit runs

@marchermans
Copy link
Contributor

I'd prefer the MC jar override to be manual via a system prop. Is that unreasonable? That would better match NG's logic.

Yes and no.
This follows NGs logic much better, since NGs logic relies on classpath ordering specifications as defined by Oracle for the JVM --classpath parameter.
The addition of NGs removal and subsequent further modification of the classpath in general is caused by the fact that with duplicates it won't start at all.

@marchermans
Copy link
Contributor

@Technici4n What is the state on this?
We still need this

@Technici4n
Copy link
Member

In case this got lost: my preference is still to pass the desired MC jar and client-extra as a system prop or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants