JPMS: Cannot use both annotations and type-annotations
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
I'm trying to use both [@Immutable and @ImmutableTypeParameter](https://errorprone.info/bugpattern/Immutable#immutabletypeparameter) in a JPMS project. However, using annotations from both `error_prone_annotations` and `error_prone_type_annotations` doesn't work because they both export the same package.
```java
module test.foo {
requires com.google.errorprone.annotations;
requires com.google.errorprone.type.annotations;
}
```
Compilation fails with:
> [ERROR] module test.foo reads package com.google.errorprone.annotations from both com.google.errorprone.type.annotations and com.google.errorprone.annotations
Is there a path to supporting all available annotations with JPMS?
Contributor guide
Assessment
This issue has not been assessed yet.