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

JarJar does not skip loading libraries that are already on the classpath #202

Closed
Technici4n opened this issue Sep 5, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Technici4n
Copy link
Member

identifyMod is used by JarJar to skip jar-in-jar'ed dependencies that are already loaded. For libraries however, it returns the file name which makes it impossible to override a jar-in-jar'ed dependency with a different version. It would be better to return the module name for libraries.

protected String identifyMod(final IModFile modFile) {
if (modFile.getModFileInfo() == null || modFile.getModInfos().isEmpty()) {
return modFile.getFileName();
}
return modFile.getModInfos().stream().map(IModInfo::getModId).collect(Collectors.joining());
}

@Technici4n Technici4n added the bug Something isn't working label Sep 5, 2024
@lukebemish
Copy link
Contributor

If I understand how that works right, the identity stuff for files with a mod ID is also wrong there -- you could have a library jarar-ed with mods foo and bar and a root level file with the single mod foobar and the latter would replace the former which is wrong. Simple fix is to just join by something that's not part of a mod ID, right? Maybe ,, that's done elsewhere.

@Technici4n
Copy link
Member Author

Fixed by #206.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants