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 2023/10/31 21:24:56 UTC

[I] gradle's incremental compilation can get confused and lead to odd build errors [lucene]

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

   ### Description
   
   Recent builds failed with:
   ```
   org.apache.lucene.search.uhighlight.TestLengthGoalBreakIterator > testTargetLen FAILED
       java.lang.NoSuchMethodError: 'org.apache.lucene.util.automaton.Automaton org.apache.lucene.util.automaton.Automata.makeStringUnion(java.util.Collection)'
           at __randomizedtesting.SeedInfo.seed([18019D3C4539B4C7:DBF0A37A952BEBF3]:0)
           at org.apache.lucene.search.uhighlight.CharArrayMatcher.fromTerms(CharArrayMatcher.java:42)
           at org.apache.lucene.search.uhighlight.MemoryIndexOffsetStrategy.buildCombinedAutomaton(MemoryIndexOffsetStrategy.java:71)
           at org.apache.lucene.search.uhighlight.MemoryIndexOffsetStrategy.<init>(MemoryIndexOffsetStrategy.java:53)
   ```
   
   As Hoss noticed, there is a repro to get the above error:
   ```
   It's actually pretty trivial to reproduce this problem locally...
   
   git co 11436a848cbcc8302b31ca01e63e57dd35a93b1e
   ./gradlew clean classes testClasses
   git co 361f0a4524d93fc1a793aa72bfcc91c00fa3599e
   ./gradlew test --tests TestFlattenGraphFilter
   ```
   
   I'll try to figure out why this can happen, it shouldn't.
   
   ### Version and environment details
   
   _No response_


-- 
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] JavaCompile tasks may be in up-to-date state when modular dependencies have changed leading to odd runtime errors [lucene]

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

   I've provided a PR that fixes this. It is a corner case of us providing custom javac parameters (modular classpath). I am surprised this took so long to be discovered and I apologize - it's an oversight - we did have a dependsOn clause but it's different than task inputs (dependsOn is more of a task graph scheduling hint, inputs is a task _status_ hint).
   
   I've checked the PR by running Hoss's repro:
   ```
   git co 11436a848cbcc8302b31ca01e63e57dd35a93b1e
   ./gradlew clean classes testClasses
   git co [head of PR branch]
   ./gradlew test --tests TestFlattenGraphFilter
   ```
   everything works and the code is recompiled as it should now.


-- 
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] gradle's incremental compilation can get confused and lead to odd build errors [lucene]

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

   I think the reason for an up-to-date status is because we handle module path ourselves
   ```
           // Add modular dependencies and their transitive dependencies to module path.
           task.options.compilerArgumentProviders.add(modularPaths.compilationArguments)
   ```
   which means gradle can't inspect the _contents_ of those dependencies (as it would with regular classpath entries).
   
   I have to think how to handle this better. It's already hairy enough.


-- 
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] JavaCompile tasks may be in up-to-date state when modular dependencies have changed leading to odd runtime errors [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss closed issue #12742: JavaCompile tasks may be in up-to-date state when modular dependencies have changed leading to odd runtime errors
URL: https://github.com/apache/lucene/issues/12742


-- 
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] gradle's incremental compilation can get confused and lead to odd build errors [lucene]

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

   It's not incremental compilation - it's something that is related to task inputs and (likely) modular dependencies. Seems like we're missing something that makes the test compilation task to be marked as up-to-date, even though its dependencies (core) have been recompiled. 
   
   I couldn't find the cause yet, but I'll keep digging.


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