Skip to content

Ineffective fix of #3779 #3822

@ppkarwasz

Description

@ppkarwasz

Unfortunately, PR #3785 did not resolve #3779. I mistakenly applied the new error-prone-annotations.version property only to the Gradle Module Metadata plugin configuration:

<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${error-prone-annotations.version}</version>
</dependency>

The Maven dependency configuration still relies on the inherited error-prone.version, which is later trimmed by the Flatten Maven Plugin:

<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${error-prone.version}</version>
<scope>provided</scope>
</dependency>

The intention behind introducing a separate error-prone-annotations.version property—rather than overriding error-prone.version—was to avoid false positives, since error-prone.version is defined during the build but stripped afterward. However, this workaround seems to have backfired.

This highlights a deeper issue: the problem is difficult to reliably reproduce or detect:

  • Maven ignores the provided scope for dependencies in many contexts.
  • Gradle uses its own .module metadata and doesn't seem to be affected, as confirmed by the success of our Gradle integration test in release build 16091508381.

I'm open to suggestions on how we might better catch issues like this in the future—especially around metadata mismatches and flattened POM artifacts.

Originally posted by @ppkarwasz in #3785 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect, unexpected, or unintended behavior of existing codebuildAffects the build system or other automation

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions