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/07/10 18:54:55 UTC

[PR] Move more gradle scripts to java [lucene]

dweiss opened a new pull request, #14933:
URL: https://github.com/apache/lucene/pull/14933

   Just another iteration. Draft until it reaches a reasonable size.


-- 
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: [PR] Move more gradle scripts to java [lucene]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #14933:
URL: https://github.com/apache/lucene/pull/14933#issuecomment-3069184277

   This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.


-- 
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: [PR] Move more gradle scripts to java [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #14933:
URL: https://github.com/apache/lucene/pull/14933#issuecomment-3064508249

   Just a note that I may be less responsive this week due to holidays. I'll try to push this patch forward in the mean time but it is still in draft mode (so lots of changes occurring here and there).


-- 
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: [PR] Move more gradle scripts to java [lucene]

Posted by "rmuir (via GitHub)" <gi...@apache.org>.
rmuir commented on code in PR #14933:
URL: https://github.com/apache/lucene/pull/14933#discussion_r2202687658


##########
gradle/regenerate/snowball/snowball.sh:
##########
@@ -47,7 +47,7 @@ for file in ${SRCDIR}/java/org/tartarus/snowball/ext/*.java; do
   # title-case the classes (fooStemmer -> FooStemmer) so they obey normal java conventions
   base=$(basename $file)
   oldclazz="${base%.*}"
-  newclazz=${oldclazz^}
+  newclazz=$(echo "$oldclazz" | perl -pe 's/^(.)/\U$1/')

Review Comment:
   we could also try to stop doing this, and add exceptions to any checkers around the naming in use.
   
   I think I previously explored that option, but java tools were extremely angry about class named `fooStemmer`... they complained louder than you would imagine.



-- 
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: [PR] Move more gradle scripts to java [lucene]

Posted by "rmuir (via GitHub)" <gi...@apache.org>.
rmuir commented on code in PR #14933:
URL: https://github.com/apache/lucene/pull/14933#discussion_r2202685407


##########
gradle/regenerate/snowball/snowball.sh:
##########
@@ -47,7 +47,7 @@ for file in ${SRCDIR}/java/org/tartarus/snowball/ext/*.java; do
   # title-case the classes (fooStemmer -> FooStemmer) so they obey normal java conventions
   base=$(basename $file)
   oldclazz="${base%.*}"
-  newclazz=${oldclazz^}
+  newclazz=$(echo "$oldclazz" | perl -pe 's/^(.)/\U$1/')

Review Comment:
   long-term i think the best fix would be to submit snowball a patch to address the naming to remove the hack: they were welcoming of such improvements the last time I tried to work some of these hacks off.



-- 
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: [PR] Move more gradle scripts to java [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #14933:
URL: https://github.com/apache/lucene/pull/14933#issuecomment-3066353693

   I think this is already large enough and fixes enough things that we may merge it as is. I'll create another PR with more progress.


-- 
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: [PR] Move more gradle scripts to java [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #14933:
URL: https://github.com/apache/lucene/pull/14933#discussion_r2202485613


##########
build-tools/build-infra/src/main/groovy/lucene.regenerate.gradle:
##########
@@ -135,14 +195,17 @@ configure([
     //   ignoreWithSource: any other tasks that should be ignored if the internal task is ignored
     //     (checksums are identical)
     //   mustRunBefore: any tasks which should be scheduled to run after the internal task.
-    wrapWithPersistentChecksums = { Task sourceTask, Map<String, Object> extraConfig = [:] ->
+    wrapWithPersistentChecksums2 = {TaskProvider sourceTaskProvider, Map<String, Object> extraConfig = [:] ->
+      wrapWithPersistentChecksums(sourceTaskProvider.get(), extraConfig)
+    }
+    wrapWithPersistentChecksums = {Task sourceTask, Map<String, Object> extraConfig = [:] ->

Review Comment:
   This is something I'm leaving for later - it currently instantiates the task but there is no simple way around it.



##########
gradle/regenerate/snowball/snowball.sh:
##########
@@ -47,7 +47,7 @@ for file in ${SRCDIR}/java/org/tartarus/snowball/ext/*.java; do
   # title-case the classes (fooStemmer -> FooStemmer) so they obey normal java conventions
   base=$(basename $file)
   oldclazz="${base%.*}"
-  newclazz=${oldclazz^}
+  newclazz=$(echo "$oldclazz" | perl -pe 's/^(.)/\U$1/')

Review Comment:
   this hack is needed for macos because it has an old bash by default and doesn't support the fancy uppercasing syntax. Hope it's not a problem.



-- 
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: [PR] Move more gradle scripts to java [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss merged PR #14933:
URL: https://github.com/apache/lucene/pull/14933


-- 
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