Skip to content

JPMS: Cannot use both annotations and type-annotations #4888

@codeleverage

Description

@codeleverage

I'm trying to use both @Immutable and @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.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions