[ https://issues.apache.org/jira/browse/LUCENE-9201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17038132#comment-17038132 ]
Dawid Weiss commented on LUCENE-9201: ------------------------------------- Hi Tomoko. Yes, the task as I included it in the patch won't run twice (it actually shows you it's "up-to-date" at the end of the input. You can run gradle with "--console=plain" then it's more obvious which tasks run and which have been skipped. As for fixing this it really depends on what you want. Currently the only "dependency" of this task is classpath (which is wrong). I think there is no harm in precommit checks just being run all the time (at least initially) so this would work if you add it to task block definition [1]: {code} outputs.upToDateWhen { false } {code} A better solution would be indeed to declare proper task inputs (all sources involved in the check; the classpath is already a dependency). Contrary to what Uwe said you don't need any special handling for task outputs for this particular task (because we don't rely on them or cache them). I think it can just stay with inputs for precommit reasons. I'm also sorry I didn't find the time to complete the example - too much work on other fronts and family obligations. Unless you beat me to it I'll try to complete it though and commit it in so that it shows you the full picture. [1] https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/TaskOutputs.html#upToDateWhen-groovy.lang.Closure- > Port documentation-lint task to Gradle build > -------------------------------------------- > > Key: LUCENE-9201 > URL: https://issues.apache.org/jira/browse/LUCENE-9201 > Project: Lucene - Core > Issue Type: Sub-task > Affects Versions: master (9.0) > Reporter: Tomoko Uchida > Assignee: Tomoko Uchida > Priority: Major > Attachments: LUCENE-9201-ecj.patch, javadocGRADLE.png, > javadocHTML4.png, javadocHTML5.png > > Time Spent: 2h 40m > Remaining Estimate: 0h > > Ant build's "documentation-lint" target consists of those two sub targets. > * "-ecj-javadoc-lint" (Javadoc linting by ECJ) > * "-documentation-lint"(Missing javadocs / broken links check by python > scripts) -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org