uschindler commented on issue #13695:
URL: https://github.com/apache/lucene/issues/13695#issuecomment-2315647367

   > Just curious - what is the purpose of the check? I guess it sounds 
self-explanatory: if there is a license file thatisn't referenced (where?) we 
would presumably want to clean it up, but I wonder how often this is an issue 
relative to the false positives? Should we disable until we can fix?
   
   No the check is very valid. It should warn you if you have removed or added 
a dependency but its corresponding license file is still there.
   
   I think I remember the issue: The cause is in the following file: 
https://github.com/apache/lucene/blob/d55b92bae01be46656c4d373d8cb1d081b280469/gradle/validation/jar-checks.gradle
   
   The problem is that the task reporting this failure sometimes has the 
"allReferenced" empty, so it reports all existing as dangling.
   
   I think it has to do if the `ext.jarInfos` was not yet filled with 
information. On build setup this is initialized to be empty: 
https://github.com/apache/lucene/blob/d55b92bae01be46656c4d373d8cb1d081b280469/gradle/validation/jar-checks.gradle#L61
   
   Later it expects the task `collectJarInfos` to populate this. But for some 
reason as this task does not seem to have inputs/outputs configured it 
sometimes does not run. So the check tasks repots all license files as missing, 
because this suddenly substracts the empty list and everything is left over:
   
   
https://github.com/apache/lucene/blob/d55b92bae01be46656c4d373d8cb1d081b280469/gradle/validation/jar-checks.gradle#L350
   
   Basically, it always fails on a second run of gradle when the gradle daemon 
is still active and has cached the task's output somehow, but actually the task 
output is not restored into the ext property.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to