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

Provide Automatic-Module-Name #910

Closed
aholstenson opened this issue Aug 8, 2020 · 4 comments · Fixed by #1007
Closed

Provide Automatic-Module-Name #910

aholstenson opened this issue Aug 8, 2020 · 4 comments · Fixed by #1007
Assignees
Labels
enhancement superseded Issue is superseded by another

Comments

@aholstenson
Copy link

An Automatic-Module-Name in the manifest of the published JAR-files would improve Java 9+ compatibility when using modules. Currently you will receive warnings about using an unstable name derived from the module's file name.

Motivation

Targeting Java 9+ is becoming more common and being able to use RSocket while also using Java modules would be beneficial to those projects.

Desired solution

Set an Automatic-Module-Name for JARs.

Considered alternatives

A full module-info.java for every project could also be added, but is more complicated while also keeping Java 8 support.

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Oct 6, 2020

For now the low hanging fruit is to declare an "Automatic-Module-Name" in the MANIFEST just like Reactor and Netty have done.

I propose using a filename convention which is also what Java's ModuleFinder picks by default:

  • rsocket.core
  • rsocket.load.balancer
  • rsocket.micrometer
  • rsocket.transport.local
  • rsocket.transport.netty

I am aware of the recommendation to use reverse DNS naming based on the root package but there is quite a bit of divergence on among libraries this including Reactor which uses the filename convention and Netty which uses reverse DNS naming but based on module names rather than packages. Also modules (rsocket-core included) often have more than one top-level package.

@rstoyanchev
Copy link
Contributor

Moving to backlog to allow more time for feedback.

@rstoyanchev rstoyanchev modified the milestones: 1.0.3, 1.x Backlog Oct 26, 2020
@OlegDokuka OlegDokuka modified the milestones: 1.x Backlog, 1.1.1 Feb 17, 2021
@yschimke
Copy link
Member

Are we happy with this approach now? Seems like something we should be doing given we are coming up to a second LTS post JDK 9

Example from okhttp as well https://github.com/square/okhttp/blob/f8fd4d08decf697013008b05ad7d2be10a648358/mockwebserver-junit4/build.gradle

rstoyanchev added a commit to rstoyanchev/rsocket-java that referenced this issue May 13, 2021
Closes rsocketgh-910

Signed-off-by: Rossen Stoyanchev <rstoyanchev@vmware.com>
@rstoyanchev rstoyanchev linked a pull request May 13, 2021 that will close this issue
@rstoyanchev
Copy link
Contributor

This is now superseded by the actual changes in #1007.

@rstoyanchev rstoyanchev removed this from the 1.1.1 milestone May 13, 2021
@rstoyanchev rstoyanchev added the superseded Issue is superseded by another label May 13, 2021
rstoyanchev added a commit that referenced this issue May 14, 2021
Closes gh-910

Signed-off-by: Rossen Stoyanchev <rstoyanchev@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement superseded Issue is superseded by another
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants