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

Non-mod transitive dependencies are not loaded on Forge #201

Open
SquidDev opened this issue Mar 19, 2024 · 5 comments
Open

Non-mod transitive dependencies are not loaded on Forge #201

SquidDev opened this issue Mar 19, 2024 · 5 comments

Comments

@SquidDev
Copy link

This was originally cc-tweaked/CC-Tweaked#1752. I'm afraid I don't use Architectury myself, just reporting what feels like a bug.

Consider the following setup:

  • Mod A depends on several non-mod jars. These are included in the the published mod (via jarjar) and also added as normal Maven dependencies.
  • Mod B then adds a dependency on mod A.

On ForgeGradle, this works fine, because the dependencies are loaded via jarjar.

However, Architectury-Loom strips out jarjar metadata, instead assuming the jars will be loaded from the classpath. This works fine for actual mods, but because BSL/FML is A Bucket Of Fun, non-mod jars should be ignored entirely! This means that mod B needs to manually add of A's dependencies with forgeRuntimeLibrary!

@SquidDev
Copy link
Author

Ideally it should be possible to infer forgeRuntimeLibrary automatically - the legacy classpath can just contain any dependency that doesn't contain a mods.toml or FMLModType in its META-INF.mf.

@Juuxel
Copy link
Member

Juuxel commented Mar 23, 2024

Sort of a duplicate of #58. It should be possible, but I think there are some non-mod classpath jars that get special treatment from Neo/Forge and would need to be excluded from an automatically generated forgeRuntimeLibrary.

@SquidDev
Copy link
Author

"non-mod classpath jars that get special treatment from Neo/Forge" <- Oh, do you have any notes on this? I did a look through FML/BSL a few months back, and couldn't spot anything aside from FMLModType/mods.toml (and of course MOD_CLASSES), but may have missed something.

@Juuxel
Copy link
Member

Juuxel commented Mar 25, 2024

I was thinking of the libraries that are on the module path. Based on an example dev env though, they also seem to be present in the BSL classpath file, just with different versions (the module path has locked older versions while the BSL classpath has newer versions pulled in by Forge etc).

@Dragon-Seeker
Copy link

Any update on attempting to resolve this issue It's quite annoying to deal with when using Arch on neo for some libs. Sorry if this is a bad time just want to see if anything is possibly in the works.

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

No branches or pull requests

3 participants