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

Cannot build Errorprone plugin with Jigsaw #1210

Closed
KengoTODA opened this issue Jan 4, 2019 · 1 comment
Closed

Cannot build Errorprone plugin with Jigsaw #1210

KengoTODA opened this issue Jan 4, 2019 · 1 comment

Comments

@KengoTODA
Copy link

Description of the problem / feature request:

When I build my Errorprone plugin with module-info.java, I found that Errorprone plugin API has not support Jigsaw yet. To migrate tech stack from old Java 8 to latest LTS Java 11, I want to request to support Jigsaw. Here is detailed description:

  1. I need to add both of requires error.prone.check.api; and requires error.prone.annotation; in module-info.java because Errorprone plugin needs to depend on both of error_prone_check_api and error_prone_annotation. But both of them provides the package com.google.errorprone so my build fails with following error messages:

[ERROR] the unnamed module reads package com.google.errorprone from both error.prone.check.api and error.prone.annotation
[ERROR] module error.prone.check.api reads package com.google.errorprone from both error.prone.check.api and error.prone.annotation
[ERROR] module com.google.common reads package com.google.errorprone from both error.prone.check.api and error.prone.annotation
[ERROR] module auto.service reads package com.google.errorprone from both error.prone.check.api and error.prone.annotation
[ERROR] module error.prone.annotation reads package com.google.errorprone from both error.prone.check.api and error.prone.annotation

Major problem is that, both of check_api and annotation uses com.google.errorprone package to provide API. It may require us to change package of each API, because Jigsaw requests us to make sure that the package is provided by only one module.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Simply clone my GitHub repo, and switch to e15b478a then mvn clean verify will reproduce this issue. Make sure you have JDK9 on JAVA_HOME.

What version of Error Prone are you using?

2.3.2

Have you found anything relevant by searching the web?

I searched both of ML and Issues, however I found nothing related with this topic. There are several questions from Errorprone users, but no question from Errorprone plugin developers.

@sgammon
Copy link
Contributor

sgammon commented Mar 11, 2024

@cushon Also this one

@cushon cushon closed this as completed Mar 11, 2024
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