8000 Add Automatic-Module-Name · Issue #2318 · circe/circe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Automatic-Module-Name #2318

New issue

Have a ques 8000 tion 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

Open
satsen opened this issue Oct 11, 2024 · 3 comments
Open

Add Automatic-Module-Name #2318

satsen opened this issue Oct 11, 2024 · 3 comments

Comments

@satsen
Copy link
satsen commented Oct 11, 2024

I use a Java library which depends on a Scala library which uses this. So I cannot use that in a modular Java project because the scala naming of whatever_2.12 cannot automatically be converted into a Java module name, it converts into whatever.2.12 which is invalid. Please add an Automatic-Module-Name to the MANIFEST.MF of circe-core, circe-generic, circe-jawn, circe-numbers, circe-parser. The scala standard library also has a module name. Right now I need to use a patcher in my build tool to handle it.

@SergeVil
Copy link

Hi Satsen.

I have the same problem. How are you working around it now?

Best,
Serge

@SergeVil
Copy link

I needed to update MANIFEST.MF with the Automatic-Module-Name for the following to make it working:

circe-parser_2.13-0.14.0-M1.jar
circe-jawn_2.13-0.14.0-M1.jar
circe-core_2.13-0.14.0-M1.jar
circe-numbers_2.13-0.14.0-M1.jar
circe-generic_2.13-0.14.0-M1
cats-core_2.13-2.1.1.jar
cats-kernel_2.13-2.1.1.jar
jawn-parser_2.13-1.0.0.jar
shapeless_2.13-2.3.3.jar

@satsen
Copy link
Author
satsen commented Oct 30, 2024

Hi @SergeVil. I use https://github.com/gradlex-org/extra-java-module-info which allows me to declare automatic modules for libraries that don't have a valid generated name. In my build.gradle:

extraJavaModuleInfo {
	automaticModule("io.circe:circe-core_2.12", "io.circe.circe_core")
	automaticModule("io.circe:circe-generic_2.12", "io.circe.circe_generic")
	automaticModule("io.circe:circe-jawn_2.12", "io.circe.circe_jawn")
	automaticModule("io.circe:circe-numbers_2.12", "io.circe.circe_numbers")
	automaticModule("io.circe:circe-parser_2.12", "io.circe.circe_parser")
	deriveAutomaticModuleNamesFromFileNames.set(true)
}

Unfortunately, there are many other transitive dependencies with such weird names. I copied the ones related to circe, so if I missed some of circe's dependencies then you can add them yourself in the same way.

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

No branches or pull requests

2 participants
0