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

"graphql-java-extended-scalars" is not a valid module name #70

Closed
draftcode opened this issue Aug 9, 2022 · 3 comments
Closed

"graphql-java-extended-scalars" is not a valid module name #70

draftcode opened this issue Aug 9, 2022 · 3 comments

Comments

@draftcode
Copy link

Describe the bug
A clear and concise description of what the bug is.

Automatic-Module-Name is specified in the manifest, but it is an invalid module name. Because of this, while I haven't articulated on what condition this triggers, a compilation error happens.

To Reproduce

To check the module validity:

$ wget https://repo1.maven.org/maven2/com/graphql-java/graphql-java-extended-scalars/18.1/graphql-java-extended-scalars-18.1.jar
$ jar --describe-module --file graphql-java-extended-scalars-18.1.jar
Unable to derive module descriptor for: graphql-java-extended-scalars-18.1.jar
Automatic-Module-Name: graphql-java-extended-scalars: Invalid module name: 'graphql-java-extended-scalars' is not a Java identifier

I tried to create a minimal case for the compilation error, but cannot trace down what triggers an error.


As for the module name's specification, I think this part is the relevant part:

https://docs.oracle.com/javase/specs/jls/se9/html/jls-7.html#jls-7.7

ModuleDeclaration: {Annotation} [open] module Identifier {. Identifier} { {ModuleDirective} }

This is not about Automatic-Module-Name part, but based on this module declaration, the module name must be a series of Java identifier concatenated with '.'. In this "graphql-java-extended-scalars" case, hyphens cannot be a part of valid Java identifier, it's not a valid identifier.

It seems that "Automatic-Module-Name" is set since c885c60.

@draftcode
Copy link
Author

A point of input: graphql-java uses "com.graphqljava" (https://github.com/graphql-java/graphql-java/blob/master/build.gradle#L83), removing hyphens to make it Java identifier.

@sanvert
Copy link

sanvert commented Aug 16, 2022

The issue is blocking us to use the new version, can you please change the module name?

@dondonz
Copy link
Member

dondonz commented Sep 25, 2022

Closed by #79

@dondonz dondonz closed this as completed Sep 25, 2022
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

3 participants