You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Automatic-Module-Name to artifacts, particularly javac #1116
Please answer these questions before submitting your issue. Thanks!
What version of Error Prone are you using?
I'm using the javac artifact, version 9+181-r4173-1.
Does this issue reproduce with the latest release?
AFAIK it is the latest.
What did you do?
Tried to use the above from a Java 9 module-info.java file. I added the above to the module-path (using gradle so had no control over the jar name) so it would be treated as an automatic module.
What did you expect to see?
That classes would be available with a useful module name.
What did you see instead?
Java 9 reported that the classes could not be found but were in module javac.9.181.r4173.1. That is not a valid module name so it was impossible to add a "requires javac.9.181.r4173.1" to the module-info.java file to gain access to the classes.
I worked around it by adding an Automatic-Module-Name entry in the manifest (used com.google.errorprone.javac) so that would be used instead of java trying to construct one from the jar name. That would be a minimum viable solution. Alternatively, adding a complete module-info.java would work too as long as all the internal classes were exported.
It would also be helpful if the other artifacts were fixed in a similar way.
On Error Prone side, javac is only needed when using Java 8; I'd rather remove it as a dependency from error_prone_core (and adapt Maven config to add an explicit (plugin) dependency on it)
WDYT?
Activity
cushon commentedon Sep 10, 2018
Thanks, there's a related bug for
google-java-format's javac dependency: google/google-java-format#266tbroyer commentedon Sep 10, 2018
On Error Prone side, javac is only needed when using Java 8; I'd rather remove it as a dependency from error_prone_core (and adapt Maven config to add an explicit (plugin) dependency on it)
WDYT?
Set Automatic-Module-Name for annotations package.
Set Automatic-Module-Name for annotations package.
sgammon commentedon Mar 11, 2024
@cushon I think this one can be closed now too.