Stop configuring report merge tasks while configuring Detekt tasks#5813
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5813 +/- ##
=========================================
Coverage 84.61% 84.61%
Complexity 3787 3787
=========================================
Files 546 546
Lines 12918 12918
Branches 2268 2268
=========================================
Hits 10930 10930
Misses 862 862
Partials 1126 1126 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
TWiStErRob
left a comment
There was a problem hiding this comment.
LGTM, tested as well, behaviors were as expected. Please update docs, and reply to conversations.
See point 2: https://docs.gradle.org/8.0.1/userguide/task_configuration_avoidance.html#sec:task_configuration_avoidance_general > Only mutate the current task inside a configuration action... Mutating > anything other than the current task can cause indeterminate behavior in > your build.
picklebento
left a comment
There was a problem hiding this comment.
TIL
Did you catch this bug manually or there are new warnings from Gradle 8?
4f1cd71 to
ece4374
Compare
|
It was caught after #5772 was merged - I don't think it's related to Gradle 8. That warning from the Gradle docs that I referenced has been there for some time, I just haven't had a closer look until I made the change in #5772, not realising that the tasks had to be eagerly configured with the current way of configuring report merging. |
See point 2: https://docs.gradle.org/8.0.1/userguide/task_configuration_avoidance.html#sec:task_configuration_avoidance_general
Also see: #5772 (comment).
Docs should be updated to align - that can be done in a new commit once these changes are reviewed & approved.