Skip to content

Conversation

@mikomikotaishi
Copy link

@mikomikotaishi mikomikotaishi commented Dec 10, 2025

Followup to #164. Rather than an actual JPMS module, this creates a JPMS module automatically generated by Gradle (which will automatically export all packages but allow the library to be consumed through module-path rather than class-path). This improves compatibility and ease of use with projects using module-path as prior lavaplayer could not be marked requires in module-info.java.

This shouldn't require any active maintenance as it's all handled by Gradle, and is thus an improvement to #164 as the maintainers won't have update anything manually, and there won't be any breaking changes as the module is build-system generated. I didn't understand @RealMangorage's suggestion at the time but indeed it was the simplest solution, so thanks for that.

I hope that this can be reconsidered, as the previous concern was that the maintainers did not want to maintain JPMS features, but this solution only updates the build system which provides a simpler means to accomplish this and I do not see any maintenance overhead.

@mikomikotaishi
Copy link
Author

mikomikotaishi commented Dec 22, 2025

@topi314 Hi, sorry to bother you again, but could this feature be considered? If not, are there any criteria for alternative solutions that would be acceptable? While I understand that you prefer not to work with JPMS, I believe this is a feasible solution to adding this as it does not require maintenance and does provide a benefit to the library in terms of quality-of-life usage.

@topi314
Copy link
Member

topi314 commented Dec 22, 2025

I currently have no time to look into this

If anyone else wants to state their opinion on this they can do so

@mikomikotaishi
Copy link
Author

It was @devoxin who originally told me what the problem with the previous PR was (that you guys didn't want to maintain JPMS files you had no experience with), but they haven't been active since November, but either way take your time as needed in investigating this

@topi314
Copy link
Member

topi314 commented Dec 22, 2025

I am aware
I talked to Devoxin about this when he told you that and this was the opinion from both of us

@RealMangorage
Copy link

What do you need to be able to allow this to be pulled in?

@mikomikotaishi
Copy link
Author

mikomikotaishi commented Dec 27, 2025

I will add that JDA, which uses Java 8, does this too to support JPMS module-path:

https://github.com/discord-jda/JDA/blob/master/build.gradle.kts#L372-L375

val jar by tasks.getting(Jar::class) {
    archiveBaseName.set(project.name)
    manifest.attributes("Implementation-Version" to project.version, "Automatic-Module-Name" to "net.dv8tion.jda")
}

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