Indeed, it's when I run multiple tests that I see the problems. Running single test classes seems to work OK. In the past I have been able to run the entire test suite, but I agree this is less critical than being able to debug single tests. Cursory internet search indicates the problem is widespread and others propose using the same plan - don't use gradle test runner in intellij. By the way, the classpath problems seem to occur with either method (gradle or intellij) when running entire suite - I just confused while switching back and forth. This is on main, haven't tried 9x recently
On Fri, Jun 7, 2024 at 4:05 PM Dawid Weiss <dawid.we...@gmail.com> wrote: > > > Hi Mike, > > Are you trying to run all the tests from Lucene from IntelliJ? I admit I > haven't tried that... :) I usually use intellij for running/ debugging > isolated classes, then rerun the full suite from command line (increased > parallelism). I don't think everything will work - if something needs a > specific setup done by gradle tasks or has resources under src, where they're > not seed as resources by intellij and thus not copied - tough luck. But most > stuff should work. > > Running via gradle is slow for me not just with Lucene but also with other > projects... I can take a look but I'm pessimistic I can do any wonders here. > > Dawid > > On Fri, Jun 7, 2024 at 6:06 PM Michael Sokolov <msoko...@gmail.com> wrote: >> >> I'm also getting errors like: >> >> Caused by: java.lang.ExceptionInInitializerError: Exception >> java.lang.LinkageError: MemorySegmentIndexInputProvider is missing in >> Lucene JAR file [in thread >> "TEST-TestDemo.testDemo-seed#[872544629C2881C6]"] >> >> I wonder if this is due to some kind of module permissions thing >> controlling the visibility of these symbols? >> >> On Fri, Jun 7, 2024 at 11:53 AM Michael Sokolov <msoko...@gmail.com> wrote: >> > >> > hm I found FakeCharFilterFactory in src/test/META-INF.services -- it's >> > in a "test sources root" folder and won't allow itself to be set as a >> > resources folder? hm even after fiddling with this - I finally get to >> > mark it as "test resources root" my test is still not passing. This >> > can't be this hard! >> > >> > On Fri, Jun 7, 2024 at 11:44 AM Michael Sokolov <msoko...@gmail.com> wrote: >> > > >> > > hmm so after playing around with this Intellij build for a bit I ran >> > > into some trouble -- all the tests relying on SPI seemed to start >> > > failing. So then I switched back to build with Gradle and rebuild the >> > > project and these tests passed. Just to double check there wasn't some >> > > strange stale build problem, I think switched back again to IntelliJ >> > > builder and I still see the same failures; example is like: >> > > >> > > NOTE: reproduce with: gradlew test --tests >> > > TestAnalysisSPILoader.testLookupCharFilter >> > > -Dtests.seed=88A2DA17C6510A33 -Dtests.locale=en-PR >> > > -Dtests.timezone=Etc/GMT-9 -Dtests.asserts=true >> > > -Dtests.file.encoding=UTF-8 >> > > >> > > java.lang.IllegalArgumentException: A SPI class of type >> > > org.apache.lucene.analysis.CharFilterFactory with name 'Fake' does not >> > > exist. You need to add the corresponding JAR file supporting this SPI >> > > to your classpath. The current classpath supports the following names: >> > > [] >> > > >> > > I guess there must be some setup required in order to expose the SPI >> > > resource files to the build? So I checked some of the resources >> > > folders like lucene/analysis/common/src/resources and sure enough it >> > > is labeled as a resources folder in intellij UI. So ... what am I >> > > missing? >> > > >> > > On Fri, Jun 7, 2024 at 10:40 AM Michael Sokolov <msoko...@gmail.com> >> > > wrote: >> > > > >> > > > ok, life must be scary for developers on windows! >> > > > >> > > > On Fri, Jun 7, 2024 at 10:33 AM Dawid Weiss <dawid.we...@gmail.com> >> > > > wrote: >> > > > > >> > > > > >> > > > > Certain regenerate tasks do require perl and python indeed. >> > > > > >> > > > > On Fri, Jun 7, 2024 at 2:23 PM Michael Sokolov <msoko...@gmail.com> >> > > > > wrote: >> > > > >> >> > > > >> While editing this CONTRIBUTING.md I found the following statement: >> > > > >> >> > > > >> Some build tasks (in particular `./gradlew check`) require Perl >> > > > >> and Python 3. >> > > > >> >> > > > >> Is it actually true that we require Perl? >> > > > >> >> > > > >> On Fri, Jun 7, 2024 at 8:11 AM Michael Sokolov <msoko...@gmail.com> >> > > > >> wrote: >> > > > >> > >> > > > >> > So I'm glad we have a fix for this, but it's making me realize >> > > > >> > that >> > > > >> > any new joiner that uses intellij (probably most of them?) will >> > > > >> > have >> > > > >> > this problem and have no idea what to do about it. They will just >> > > > >> > conclude - running Lucene tests in intellij sucks. If we revived >> > > > >> > that >> > > > >> > intellij target maybe that would help - but .. you would have to >> > > > >> > know >> > > > >> > to run it! So then I went to look at our project web page to see >> > > > >> > what >> > > > >> > kind of developer docs we have that a new contributor might find. >> > > > >> > >> > > > >> > The first place Google sent me was to our github page >> > > > >> > https://github.com/apache/lucene/?tab=readme-ov-file-- that one >> > > > >> > has >> > > > >> > some very brief description about how to build, but nothing about >> > > > >> > intellij. It does have a prominent link to "Developer >> > > > >> > documentation" >> > > > >> > which is here: >> > > > >> > https://github.com/apache/lucene/tree/main/dev-docs but >> > > > >> > that folder is mostly empty; it has a few somewhat esoteric bits >> > > > >> > of >> > > > >> > info, but again nothing basic about building and testing; no >> > > > >> > discussion of all the myriad gradle tasks and deep help info that >> > > > >> > exists there. >> > > > >> > >> > > > >> > Next I tried looking on apache.org, but actually it is quite hard >> > > > >> > to >> > > > >> > find any info about Lucene there - Apache just has too many >> > > > >> > projects. >> > > > >> > I did finally find this page though >> > > > >> > https://projects.apache.org/project.html?lucene-core and it links >> > > > >> > to >> > > > >> > https://lucene.apache.org/core/. From there, I see a "Developer" >> > > > >> > link, >> > > > >> > again this page has a paucity of info; basically it links you to >> > > > >> > github, jenkins, and to the wiki. The "wiki" link actually just >> > > > >> > takes >> > > > >> > you to a different github page -- and *this* one actually has some >> > > > >> > useful info on how to build -- I think it's our best "intro" page >> > > > >> > for >> > > > >> > a new developer. However all it says about IntelliJ is: "IntelliJ >> > > > >> > - >> > > > >> > IntelliJ idea can import and build gradle-based projects out of >> > > > >> > the >> > > > >> > box." true, sort of. >> > > > >> > >> > > > >> > So I think I will (1) add a note about this IJ build setting to >> > > > >> > that >> > > > >> > page, and (2) consolidate some of the other links to go here >> > > > >> > instead >> > > > >> > of routing folks through a twisty maze of web pages >> > > > >> > >> > > > >> > On Fri, Jun 7, 2024 at 7:45 AM Stefan Vodita >> > > > >> > <stefan.vod...@gmail.com> wrote: >> > > > >> > > >> > > > >> > > +1, I had the same problem and it seems better now. Thank you, >> > > > >> > > Dawid! >> > > > >> > > >> > > > >> > > On Thu, 6 Jun 2024 at 12:20, Michael Sokolov >> > > > >> > > <msoko...@gmail.com> wrote: >> > > > >> > >> >> > > > >> > >> Oh! TIL! so much better, thanks. And now I have the "Repeat" >> > > > >> > >> option >> > > > >> > >> back in the test runner >> > > > >> > >> >> > > > >> > >> On Thu, Jun 6, 2024 at 6:18 AM Dawid Weiss >> > > > >> > >> <dawid.we...@gmail.com> wrote: >> > > > >> > >> > >> > > > >> > >> > >> > > > >> > >> > Don't know what's causing this... but I never run IntelliJ >> > > > >> > >> > builds or tests through its gradle launcher, actually. >> > > > >> > >> > Switch it to compile and run using its own built-in method - >> > > > >> > >> > much faster. >> > > > >> > >> > >> > > > >> > >> > >> > > > >> > >> > >> > > > >> > >> > Dawid >> > > > >> > >> > >> > > > >> > >> > On Thu, Jun 6, 2024 at 12:10 PM Michael Sokolov >> > > > >> > >> > <msoko...@gmail.com> wrote: >> > > > >> > >> >> >> > > > >> > >> >> Hi, I wonder how many of us are using intellij to run >> > > > >> > >> >> Lucene tests, and if you are, have you noticed it having >> > > > >> > >> >> gotten really quite slow? It seems to take a long time >> > > > >> > >> >> doing... Something... Before the test starts running. I >> > > > >> > >> >> have a suspicion that we are using gradle in a way that >> > > > >> > >> >> forces it to rebuild its cache every time or something like >> > > > >> > >> >> that. Once upon a time we had an intellij build setup >> > > > >> > >> >> target that set things up in a more intellij friendly way, >> > > > >> > >> >> according gradle, didn't we? Does that still exist? >> > > > >> > >> >> > > > >> > >> --------------------------------------------------------------------- >> > > > >> > >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> > > > >> > >> For additional commands, e-mail: dev-h...@lucene.apache.org >> > > > >> > >> >> > > > >> >> > > > >> --------------------------------------------------------------------- >> > > > >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> > > > >> For additional commands, e-mail: dev-h...@lucene.apache.org >> > > > >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: dev-h...@lucene.apache.org >> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org