Skip to content

Add Automatic-Module-Name for Java 9 compatibility#185

Closed
florian-beetz wants to merge 1 commit into
com-lihaoyi:masterfrom
florian-beetz:master
Closed

Add Automatic-Module-Name for Java 9 compatibility#185
florian-beetz wants to merge 1 commit into
com-lihaoyi:masterfrom
florian-beetz:master

Conversation

@florian-beetz

Copy link
Copy Markdown

This adds an Automatic-Module-Name to the JAR manifests, allowing the library to be used on the Java 9 module path.

If the library was used before on the Java 9 module path, the module name was derived from the filename of the JAR at runtime to sourcecode.2.12, sourcecode.utils.2.12, etc., which are not a valid Java identifiers.

Fastparse is compatible with Java 9 when the dependency on sourcecode was updated to a version where com-lihaoyi/sourcecode#49 is included.

Closes #184

@florian-beetz

Copy link
Copy Markdown
Author

@lihaoyi Do you think we could get this (and com-lihaoyi/sourcecode#49) merged? This is a blocker for Java 9 compatibility for us right now.

@tobiasdiez

Copy link
Copy Markdown

@lihaoyi @olafurpg @vovapolu can you please merge this PR (or fix the underlying issue in another way), because otherwise the library cannot be used with Java 9 or newer. Thanks a lot!

@tobiasdiez

Copy link
Copy Markdown

I tried to update this PR to reflect the recent changes to the build script. However, I was not able to find an option in mill to add something to the MANIFEST.MF file.

It appears that https://github.com/lihaoyi/mill/blob/eececd6bbabd88b155a86e376a19d3aeee19cccf/main/src/modules/Jvm.scala#L193-L201 is responsible for writing the meta file, but the content does not seem to be configurable. @alexarchambault @olafurpg any ideas how to proceed to get a version that works with >= Java 9?

@tobiasdiez

Copy link
Copy Markdown

@lihaoyi Is this PR still relevant for 2.2.3?

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.

Add a 'Automatic-Module-Name' for Java 9 compatibility

2 participants