freefair / gradle-plugins

Gradle Plugin Collection
https://docs.freefair.io/gradle-plugins/current/reference/
MIT License
224 stars 33 forks source link

Generated lombokConfigTasks use files but do not depend on the source tasks #442

Closed richip closed 2 years ago

richip commented 2 years ago

While using the https://github.com/unbroken-dome/gradle-xjc-plugin plugin, doing a build results in the error:

> Task :xjcGenerate
Execution optimizations have been disabled for task ':xjcGenerate' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/home/richip/src/albion-online-database-client/build/generated/sources/xjc/java/main'. Reason: Task ':generateMainEffectiveLombokConfig2' uses this output of task ':xjcGenerate' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Should the code that generates it (ConfigUtil.getLombokConfigTasks) be the one to indicate this dep? The gradle script author? Or should the xjcGenerate script do something to indicate it contributes to a srcDir?

larsgrefer commented 2 years ago

Can you provide a small sample project which reproduces this error?

boerngen-schmidt commented 2 years ago

@larsgrefer I attached you a very simple project freefair-lombok-442.zip

MayCXC commented 2 years ago

@larsgrefer was this resolved? I am running into a similar problem using dgs-codegen.

larsgrefer commented 2 years ago

@MayCXC This should be fixed in 6.4.0 If you still have a problem with the current version, feel free to open a new issue

michaeljacksonatvyrl commented 2 years ago

I can confirm that netflix's dgs plugin and 6.4.0 are throwing a similar dependency error in recent gradle (7.4). I will look into opening a new issue. Thank you for this plugin and all your help!