Skip to content

Add proper module name in Manifest #731

Open

Description

@blacelle

Hello,

Any plan to add proper jpms/JDK9 module configuration into the library?

Current manifest looks like :

Manifest-Version: 1.0
Build-Jdk-Spec: 25
Build-OS: Mac OS X aarch64 26.1
Build-Tool-Jdk-Spec: 25
GroupId-ArtifactId: org.apache.datasketches:datasketches-java
Implementation-Vendor: The Apache Software Foundation
git-branch: 9.0.X
git-commit-id: f3b334b380feee9f928500de9adb6bbf763fc104
git-commit-tag: 9.0.0-RC1
git-commit-time: 
git-commit-user-email: xxx@yyy.com

An easy way forward would be through an additional Automatic-Module-Name entry, like:

Automatic-Module-Name: org.apache.datasketches

it can be done with something like:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jar-plugin</artifactId>
	<configuration>
		<archive>
			<manifestEntries>
				<Automatic-Module-Name>org.apache.datasketches</Automatic-Module-Name>
			</manifestEntries>
		</archive>
	</configuration>
</plugin>

edit: I would benefit from this going from datasketches 7.X

Activity

  1. leerho commented on Apr 1, 2026

    @leerho
    Member

    I can add this so it will go into our next release (either a 9.1.0 or a 9.0.1, not sure yet)

    We have several library projects also based on Java, So I think this name should be unique. For example:

    • org.apache.datasketches-java
    • org.apache.datasketches-memory
    • org.apache.datasketches-hive
    • org.apache.datasketches-pig

    So I think this should be named: org.apache.datasketches-java. Don't you think? I'm not that familiar with JPMS.

  2. blacelle commented on Apr 2, 2026

    @blacelle
    Author

    Similar report to another library (hoping it help getting the context): fast-pack/JavaFastPFOR#69

    We have several library projects also based on Java, So I think this name should be unique.

    Yes, it has to be unique per .jar.

    So I think this should be named: org.apache.datasketches-java. Don't you think?

    I tend to agree org.apache.datasketches-java is better, as it follows the maven module naming convention. org.apache.datasketches followed a (too quick) look at package names.

    In current state, I get at compilation:

    00:36:58,040 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - --- compiler:3.15.0:compile (default-compile) @ adhoc-encoding ---
    00:36:58,209 [WARNING] org.apache.maven.plugin.compiler.CompilerMojo - ***************************************************************************************************************************************************
    00:36:58,212 [WARNING] org.apache.maven.plugin.compiler.CompilerMojo - * Required filename-based automodules detected: [datasketches-java-7.0.1.jar]. Please don't publish this project to a public artifact repository! *
    00:36:58,212 [WARNING] org.apache.maven.plugin.compiler.CompilerMojo - ***************************************************************************************************************************************************
    

    I can add this so it will go into our next release (either a 9.1.0 or a 9.0.1, not sure yet)

    Does it mean no hope to get a release with this on 7.X and 8.X branches?

  3. leerho commented on Apr 3, 2026

    @leerho
    Member

    I can no longer compile 7.0.X and 8.0.X branches because they depend on incubator and preview code, which is no longer available. These dependencies were early versions of the now released FFM functionality. Which is why you are getting those warnings. Alas, I had no choice at the time, as Oracle blocked access to some of the JVM internals.

    Are you trying to use this code with Slack, by any chance?

  4. blacelle commented on Apr 3, 2026

    @blacelle
    Author

    Are you trying to use this code with Slack, by any chance?

    Nope. I hit your library to get an HHL and KMV on the shelf.

    I was looking for 7.X as would use it in a library based on JDK21 (without preview options).

  5. leerho commented on Apr 3, 2026

    @leerho
    Member

    Unfortunately, the DS-Java 7.X does require a preview option.
    My recommendation would be for you to migrate to version 9.X (on Java 25), which has no dependencies, pure Java, and is faster.

  6. blacelle commented on Apr 4, 2026

    @blacelle
    Author

    Unfortunately, the DS-Java 7.X does require a preview option.

    I understand it requires JDK17 preview option, but they are standard option in JDK21. At the very least, I have no compile or runtime issue with it running a standard JDK21.

  7. blacelle commented on Apr 7, 2026

    @blacelle
    Author

    Hi. We are working into a JDK25 version of our project. Do you have any ETA for this matter on 9.x @leerho? Thanks

  8. blacelle commented on Apr 27, 2026

    @blacelle
    Author

    Any news @leerho ? TY

  9. blacelle commented on May 19, 2026

    @blacelle
    Author

    Any news @leerho ? TY

  10. leerho commented on May 29, 2026

    @leerho
    Member

    Sorry, I have been overwhelmed with family issues and other priorities. I hope to get to this in the next month or so.

  11. leerho commented on Jun 1, 2026

    @leerho
    Member

    I have Automatic Module Name configured for the next version of datasketches-memory-7.0.0, which should be released in the next few weeks. Once this is out, I can start work on upgrading datasketches-java versions 7.X (for Java 17) and 8.X (for Java 21) to use the new DS-memory-7.X (which will work on Java 11, 17, 21).

    You say you have no compile or runtime operations with DS-java 8.X on Java 21. Have you tried any off-heap or file-mapped memory operations using MemorySegments?

    I am a little unclear about your need to run the library on Java 17 vs Java 21 vs Java 25. Please elaborate.

    Also, I don't understand the urgency of providing an Automatic Module Name, which I will be adding, among many other priorities, but what is the urgency? If your application declares the DS-java jar in its module-info.java file, the system automatically generates a module name based strictly on the JAR's filename.

  12. blacelle commented on Jun 2, 2026

    @blacelle
    Author

    Have you tried any off-heap or file-mapped memory operations using MemorySegments?

    For now, I'm just considering HLL and KMV.

    I am a little unclear about your need to run the library on Java 17 vs Java 21 vs Java 25. Please elaborate.

    I upgraded given project in JDK25. Hence, I could benefit JPMS in DataSketches in JDK21 for bugfix versions, else AutomatedModules in JDK25 would cover most of my needs.

    Also, I don't understand the urgency of providing an Automatic Module Name, which I will be adding, among many other priorities, but what is the urgency?

    No urgency as, in the meantime, in order to publish our own project, we had to remove the dependency to DataSketches.

    If your application declares the DS-java jar in its module-info.java file, the system automatically generates a module name based strictly on the JAR's filename.

    We integrate DataSketches into a library: automated module-names based on file prevents deployment of the dependant:

    00:36:58,040 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - --- compiler:3.15.0:compile (default-compile) @ adhoc-encoding ---
    00:36:58,209 [WARNING] org.apache.maven.plugin.compiler.CompilerMojo - ***************************************************************************************************************************************************
    00:36:58,212 [WARNING] org.apache.maven.plugin.compiler.CompilerMojo - * Required filename-based automodules detected: [datasketches-java-7.0.1.jar]. Please don't publish this project to a public artifact repository! *
    00:36:58,212 [WARNING] org.apache.maven.plugin.compiler.CompilerMojo - ***************************************************************************************************************************************************
    
  13. leerho commented on Jun 2, 2026

    @leerho
    Member

    @blacelle,
    I don't think you understood my question:
    "You say you have no compile or runtime operations with DS-java 8.X on Java 21. Have you tried any off-heap or file-mapped memory operations using MemorySegments?"

    DataSketches-java versions 7.X and 8.X provide the ability to perform / store your sketches off-heap. In order to do that you have to use one of the constructors that take a Memory object. Underneath the covers that Memory object leverages the "preview" FFM (MemorySegments) features of Java 21. Since those preview features are no longer available, your project will likely fail. If you don't care about using off-heap memory, you will be OK.

  14. leerho commented on Jun 2, 2026

    @leerho
    Member

    Also, If you have migrated your application to operate with Java 25, You should download and use DataSketches-java 9.0.1, where using off-heap memory is no longer a problem.

    I realize that DS-java 9.0.1 does not declare an Automatic Module Name. This will be fixed when I can get to it.

  15. blacelle commented on Jun 3, 2026

    @blacelle
    Author

    If you don't care about using off-heap memory, you will be OK.

    I use the default setup with respect to memory for DS: I guess we then rely on off-heap memory.

    I realize that DS-java 9.0.1 does not declare an Automatic Module Name. This will be fixed when I can get to it.

    Keen to get it. Though, even 9.0.1 seems not available from m2central: https://mvnrepository.com/artifact/org.apache.datasketches/datasketches-java

  16. leerho commented on Jun 11, 2026

    @leerho
    Member

    I am jut finishing the release of ds-memory 7.0.0. I will be working on ds-java next. I am aware of this issue, but the next ds-java releases will take a while. (Yes, there is not 9.0.1 yet!) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions