You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "dweiss (via GitHub)" <gi...@apache.org> on 2025/09/15 18:59:10 UTC

[I] Remove apache-rat dependency completely? [lucene]

dweiss opened a new issue, #15185:
URL: https://github.com/apache/lucene/issues/15185

   This is a quick check if anybody minds...
   
   I've had a few attempts to refactor apache rat code (that checks file licenses) and I have to say my conclusion is that it'd be much simpler to just write a simple, specialized task instead of bringing up rat's machinery.
   
   What we need is very simple: 
   * scan source files with some inclusion/exclusions (gradle task/ file collections would handle this),
   * check if these source files are covered under any of the approved licenses; the list of licenses is very small and they have basic substring-based matchers.
   * fail if we can't match any of the licenses.
   
   That's it really. We don't need any fancy report, aggregation or exotic licenses. Going through ant/xml report parsing is costly and reimplementing the same on top of rat's current API proved to be a headache (for me). I'd rather just implement it as a basic incremental gradle task, with permitted license string matchers embedded inside.
   
   If anybody can think of a reason this is a bad idea - please let me know.


-- 
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-unsubscribe@lucene.apache.org.apache.org

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


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


Re: [I] Remove apache-rat dependency completely? [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15185:
URL: https://github.com/apache/lucene/issues/15185#issuecomment-3299581914

   https://github.com/carrotsearch/nsf-configs/issues/234


-- 
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-unsubscribe@lucene.apache.org

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


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


Re: [I] Remove apache-rat dependency completely? [lucene]

Posted by "rmuir (via GitHub)" <gi...@apache.org>.
rmuir commented on issue #15185:
URL: https://github.com/apache/lucene/issues/15185#issuecomment-3293617192

   I agree, I tried to make some progress the other day and seemed to only uncover more breaks and problems. 
   


-- 
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-unsubscribe@lucene.apache.org

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


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


Re: [I] Remove apache-rat dependency completely? [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15185:
URL: https://github.com/apache/lucene/issues/15185#issuecomment-3293650750

   I've removed it completely on my dev branch. Will reimplement basic license checks tomorrow. I think this should be simpler to manage and comprehend.


-- 
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-unsubscribe@lucene.apache.org

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


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


Re: [I] Remove apache-rat dependency completely? [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15185:
URL: https://github.com/apache/lucene/issues/15185#issuecomment-3300167529

   I rewrote it to be incremental and only read the leading header of each file. It's super fast. I'll finish porting all the patterns tomorrow and make a pr. Sorry, too tired today.
   
   https://github.com/dweiss/lucene/blob/gradle-plugins-to-java-8/build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/licenses/CheckLicensesTask.java
   


-- 
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-unsubscribe@lucene.apache.org

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


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


Re: [I] Remove apache-rat dependency completely? [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15185:
URL: https://github.com/apache/lucene/issues/15185#issuecomment-3293517589

   Related - https://github.com/apache/lucene/pull/14582


-- 
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-unsubscribe@lucene.apache.org

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


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


Re: [I] Remove apache-rat dependency completely? [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss closed issue #15185: Remove apache-rat dependency completely?
URL: https://github.com/apache/lucene/issues/15185


-- 
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-unsubscribe@lucene.apache.org

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


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