You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/01 17:02:29 UTC

[GitHub] [lucene-solr] donnerpeter opened a new pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

donnerpeter opened a new pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283


   … being deleted in source
   
   <!--
   _(If you are a project committer then you may remove some/all of the following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system for Lucene or Solr:
   
   * https://issues.apache.org/jira/projects/LUCENE
   * https://issues.apache.org/jira/projects/SOLR
   
   You will need to create an account in Jira in order to create an issue.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * LUCENE-####: <short description of problem or changes>
   * SOLR-####: <short description of problem or changes>
   
   LUCENE and SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
   
   
   # Description
   
   e.g. *.sug files used in Hunspell
   
   # Solution
   
   Make Gradle `Sync` them instead of `Copy`
   
   # Tests
   
   No
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `master` branch.
   - [x] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Ref Guide](https://github.com/apache/lucene-solr/tree/master/solr/solr-ref-guide) (for Solr changes only).
   


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

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


[GitHub] [lucene-solr] donnerpeter commented on a change in pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
donnerpeter commented on a change in pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#discussion_r570083701



##########
File path: gradle/ant-compat/folder-layout.gradle
##########
@@ -25,11 +25,15 @@ allprojects {
       test.resources.srcDirs = ['src/test-files']
     }
 
-    task copyTestResources(type: Copy) {
+    task copyTestResources(type: Sync) {
       from('src/test') {
         exclude '**/*.java'
       }
       into sourceSets.test.java.outputDir
+      preserve {
+        include '**/*.class'
+        include 'META-INF/services/*'

Review comment:
       `Sync` deletes everything in the target which isn't in the source, and the target is a normal compiler output root, which contains class files etc. I've tried to enumerate things that shouldn't be deleted here, but I'm not terribly sure this list is exhaustive. I haven't seen issues with this settings so far, but I'm only working on Hunspell subset. What's worse, the issues I've seen before adding `preserve` appeared not immediately and somewhat randomly and weren't easy to decipher. So while the issue is there and should be addressed, I'm not sure this is the full fix.




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

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


[GitHub] [lucene-solr] donnerpeter closed pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
donnerpeter closed pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283


   


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

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


[GitHub] [lucene-solr] dweiss commented on pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#issuecomment-773300099






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

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


[GitHub] [lucene-solr] donnerpeter commented on pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
donnerpeter commented on pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#issuecomment-773304025


   Thanks for the explanation!


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

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


[GitHub] [lucene-solr] dweiss commented on pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#issuecomment-773307182


   So, to summarize - moving those resource files to {{src/test-files}} should do the job. I don't know whether gradle handles syncing resources upon compilation (it should!). Even the plain sync task has its issues in gradle itself -
   https://github.com/gradle/gradle/issues/1349


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

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


[GitHub] [lucene-solr] donnerpeter commented on a change in pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
donnerpeter commented on a change in pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#discussion_r570083701



##########
File path: gradle/ant-compat/folder-layout.gradle
##########
@@ -25,11 +25,15 @@ allprojects {
       test.resources.srcDirs = ['src/test-files']
     }
 
-    task copyTestResources(type: Copy) {
+    task copyTestResources(type: Sync) {
       from('src/test') {
         exclude '**/*.java'
       }
       into sourceSets.test.java.outputDir
+      preserve {
+        include '**/*.class'
+        include 'META-INF/services/*'

Review comment:
       `Sync` deletes everything in the target which isn't in the source, and the target is a normal compiler output root, which contains class files etc. I've tried to enumerate things that shouldn't be deleted here, but I'm not terribly sure this list is exhaustive. I haven't seen issues with this settings so far, but I'm only working on Hunspell subset. What's worse, the issues I've seen before adding `preserve` appeared not immediately and somewhat randomly and weren't easy to decipher. So while the issue is there and should be addressed, I'm not sure this is the full fix.




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

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


[GitHub] [lucene-solr] donnerpeter commented on pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
donnerpeter commented on pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#issuecomment-773304025


   Thanks for the explanation!


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

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


[GitHub] [lucene-solr] donnerpeter closed pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
donnerpeter closed pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283


   


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

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


[GitHub] [lucene-solr] dweiss commented on pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#issuecomment-773301527


   The way this should be cleaned up is to remove any resources from src/test (move them to the resources folder). But this will have to wait until Solr/Lucene repos are split.


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

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


[GitHub] [lucene-solr] dweiss commented on pull request #2283: LUCENE-9719: Resource files aren't deleted from build directory after…

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #2283:
URL: https://github.com/apache/lucene-solr/pull/2283#issuecomment-773300099


   This is for backward compatibility with ant and should be removed eventually. Don't make it a sync, it won't help. If you need to wipe out build, run gradlew clean. Sorry, this is ant mess and we shouldn't try to fix it - we should just leave it behind.


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

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