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

Why is fastexcel not modularized (Java 9 module system) yet? #388

Open
hrstoyanov opened this issue Jan 29, 2024 · 5 comments
Open

Why is fastexcel not modularized (Java 9 module system) yet? #388

hrstoyanov opened this issue Jan 29, 2024 · 5 comments

Comments

@hrstoyanov
Copy link

hrstoyanov commented Jan 29, 2024

Not only that, but the jars (fastexecl-reader-x.x.x.jar) do not even have MANIFEST !? Unfortunately this becomes show-stopper issue when combined with a bug that Gradle has not fixed even today.

@ochedru , please, if you don't want to put the effort and modularize fastexcel properly, at least add MANIFEST in the jars with the below, for example:

Automatic-Module-Name: org.dhatim.fastexcel.reader
@hrstoyanov hrstoyanov changed the title Is fastexcel modularized as per Java 9 module system? Why is fastexcel not modularized (ava 9 module system) yet? Feb 4, 2024
@hrstoyanov hrstoyanov changed the title Why is fastexcel not modularized (ava 9 module system) yet? Why is fastexcel not modularized (Java 9 module system) yet? Feb 4, 2024
@ochedru
Copy link
Collaborator

ochedru commented Feb 10, 2024

Thank you for reporting this. I opened #393 to build with Java 11 and add Automatic-Module-Name to manifests. Could you please review this PR?

@ochedru
Copy link
Collaborator

ochedru commented Feb 11, 2024

Done. Please let me know if version 0.17.0 works for you.

@hrstoyanov
Copy link
Author

hrstoyanov commented Feb 11, 2024

Thanks you @ochedru !
It works, but you may want to document for users that will use fastexel as a Java module - their module definition would need to be like this:

module xyz.mymodule {
    requires org.dhatim.fastexcel.reader;
    requires org.apache.commons.compress;
}

because the excel reader module is not fully implemented (we just added a manifest workaround) and therefore it does not automatically bring in its transitive dependencies, such as the Apache's common compress module.

If you have time in future, and add proper module-info.java, only this would be requred:

module xyz.mymodule {
    requires org.dhatim.fastexcel.reader;
}

@ochedru
Copy link
Collaborator

ochedru commented Feb 13, 2024

Ok thanks. I added the help-wanted label to this issue, in case someone knowledgeable wants to open a PR to complete the modularization.

@charphi
Copy link
Contributor

charphi commented Feb 19, 2024

Ok thanks. I added the help-wanted label to this issue, in case someone knowledgeable wants to open a PR to complete the modularization.

Done in #395

Note that I have reverted to Java8 minimum requirement (because I need it in one of my projects) but the package is still fully compliant with Java9+ modules.

There is a build warning on opczip dependency because it has an automatic module name. I will make a PR on this project to fix it when I have time :)

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

No branches or pull requests

3 participants