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

Make UnionFileSystem.getBasePaths public #61

Open
Gaming32 opened this issue Feb 15, 2024 · 7 comments
Open

Make UnionFileSystem.getBasePaths public #61

Gaming32 opened this issue Feb 15, 2024 · 7 comments

Comments

@Gaming32
Copy link
Contributor

Gaming32 commented Feb 15, 2024

This is incredibly useful for discovering all elements on the classpath. Currently only getPrimaryPath is available, which isn't sufficient for UFSes with multiple base paths, such as the Minecraft one (made up of NeoForge, client-extra, and client).

@marchermans
Copy link
Member

What is the functional requirement here?

@Gaming32
Copy link
Contributor Author

getBasePaths is already a method, but it's package-private.

@marchermans
Copy link
Member

getBasePaths is already a method, but it's package-private.

That is not an argument for making it public. We encapsulate it by default. So unless you have a reason why you want this I am not sure we will do this?

@Gaming32
Copy link
Contributor Author

Gaming32 commented Feb 16, 2024

I'm enumerating the classpath of the game, and I want to get the jars in the classpath. However, if I only have access to the primary path, then some JARs that belong to certain modules are not exposed in the enumerated classpath. A good example of this is Minecraft. Minecraft is made up of three JARs: neoforge, client-extra, and client. getPrimaryPath only exposes the last, meaning that assets and NeoForge are not visible to my code relying on the classpath.

@marchermans
Copy link
Member

I'm enumerating the classpath of the game, and I want to get the jars in the classpath. However, if I only have access to the primary path, then some JARs that belong to certain modules are not exposed in the enumerated classpath. A good example of this is Minecraft. Minecraft is made up of three JARs: neoforge, client-extra, and client. getPrimaryPath only exposes the last, meaning that assets and NeoForge are not visible to my code relying on the classpath.

Enumerating the classpath of the game is a bad idea. Maybe we can provide you with a better API that is suited for your usecase.

What are you exactly trying to do?

@Gaming32
Copy link
Contributor Author

Gaming32 commented Feb 25, 2024

I'm trying to give a library that requires the classpath in a list (it can't find it itself because its locator doesn't work with Neo's class loaders) the classpath in a list.

@marchermans
Copy link
Member

I'm trying to give a library that requires the classpath in a list (it can't find it itself because it's locator doesn't work with Neo's class loaders) the classpath in a list.

Please contact me on discord.
I am not quite as comfortable with exposing this information as I need to be to merge it.

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

2 participants