Question How to Achieve Bidirectional Bypass of Classloading Isolation

koro

New member
Feb 6, 2024
1
0
1
I am currently developing several library-type plugins that are designed to work together, utilizing an additional serialization library and numerous utility methods. However, due to the classloading isolation mechanism, they are unable to function as intended. I have noticed that the bypass of classloading isolation (with the setting "join-classpath: true") is unidirectional, allowing child projects to access parent dependency plugins. However, parent dependency plugins cannot access child dependencies, leading to ClassNotFoundException exceptions when the parent dependency attempts to deserialize classes from the child projects. My work involves network interaction type plugins, a logic that is challenging to modify, yet it operates smoothly on both Fabric and NeoForge platforms.
 

electronicboy

Administrator
Staff member
Dec 11, 2021
257
15
45
28
I want to say that the open-classloader directive is what was intended to open up to other plugins in a manner of stuff like what a plugin needing to look into other classloaders needs, there is no "bypass" to how classloaders work, but, we have some ways to offer some control over how the "grouping" works