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

Minimize exposure of JDK internals #4572

Open
delanym opened this issue Sep 12, 2024 · 1 comment
Open

Minimize exposure of JDK internals #4572

delanym opened this issue Sep 12, 2024 · 1 comment

Comments

@delanym
Copy link
Contributor

delanym commented Sep 12, 2024

Have you considered adopting a module declaration?

It would allow minimizing the exposure of JDK internals to errorprone, which would surface any abuse of these internals by other third-party libraries/annotation processors.

--add-exports jdk.compiler/com.sun.tools.javac.api=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.file=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.main=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.model=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.parser=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.processing=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.tree=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.util=com.google.errorprone
--add-opens jdk.compiler/com.sun.tools.javac.code=com.google.errorprone
--add-opens jdk.compiler/com.sun.tools.javac.comp=com.google.errorprone
@cushon
Copy link
Collaborator

cushon commented Oct 1, 2024

It seems like the right thing to do eventually, I don't have specific plans on this front.

A couple of notes:

  • I think there are some split package issues between the jars, the modularized jar wouldn't map 1:1 to the current jars
  • The installation instructions would change to use --processor-module-path, with similar changes to the build system integrations

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