Skip to content

Conversation

@snazy
Copy link
Member

@snazy snazy commented Jul 3, 2023

Gradle 8.2 detects this task dependency issue, which means that the build is non-deterministic:

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':iceberg-data:revapiAnalyze' (type 'RevapiAnalyzeTask').
  - Gradle detected a problem with the following location: '/home/nastra/Development/workspace/iceberg/common/build/libs/iceberg-common-1.4.0-SNAPSHOT.jar'.

    Reason: Task ':iceberg-data:revapiAnalyze' uses this output of task ':iceberg-common:jar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

    Possible solutions:
      1. Declare task ':iceberg-common:jar' as an input of ':iceberg-data:revapiAnalyze'.
      2. Declare an explicit dependency on ':iceberg-common:jar' from ':iceberg-data:revapiAnalyze' using Task#dependsOn.
      3. Declare an explicit dependency on ':iceberg-common:jar' from ':iceberg-data:revapiAnalyze' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/8.2/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

Gradle 8.2 detects this task dependency issue, which means that the build is non-deterministic:

```
FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':iceberg-data:revapiAnalyze' (type 'RevapiAnalyzeTask').
  - Gradle detected a problem with the following location: '/home/nastra/Development/workspace/iceberg/common/build/libs/iceberg-common-1.4.0-SNAPSHOT.jar'.

    Reason: Task ':iceberg-data:revapiAnalyze' uses this output of task ':iceberg-common:jar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

    Possible solutions:
      1. Declare task ':iceberg-common:jar' as an input of ':iceberg-data:revapiAnalyze'.
      2. Declare an explicit dependency on ':iceberg-common:jar' from ':iceberg-data:revapiAnalyze' using Task#dependsOn.
      3. Declare an explicit dependency on ':iceberg-common:jar' from ':iceberg-data:revapiAnalyze' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/8.2/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
```
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes it also on my machine, thanks @snazy and @nastra for the review!

@nastra nastra merged commit e62e0ad into apache:master Jul 3, 2023
@snazy snazy deleted the fix-build-task-dependency branch July 3, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants