Commit Graph

106 Commits

Author SHA1 Message Date
Chris Hegarty f756f90644
Integrate the Incubating Panama Vector API (#12311)
Leverage accelerated vector hardware instructions in Vector Search.

Lucene already has a mechanism that enables the use of non-final JDK APIs, currently used for the Previewing Pamana Foreign API. This change expands this mechanism to include the Incubating Pamana Vector API. When the jdk.incubator.vector module is present at run time the Panamaized version of the low-level primitives used by Vector Search is enabled. If not present, the default scalar version of these low-level primitives is used (as it was previously).

Currently, we're only targeting support for JDK 20. A subsequent PR should evaluate JDK 21.
---------

Co-authored-by: Uwe Schindler <uschindler@apache.org>
Co-authored-by: Robert Muir <rmuir@apache.org>
2023-05-25 07:59:50 +01:00
Tyler Bertrand c514089d66
Gradle optimizations (#12150)
* Define inputs and outputs for task validateJarLicenses
  * Lazily configure validateJarLicenses
* Move functionality from copyTestResources task into processTestResources task
  * Lazily configure processTestResources
  * Altered TestCustomAnalyzer.testStopWordsFromFile() to find resources in updated location
* Resolve "overlapping output" issue preventing processTestResources from being cached
* Provide system properties from CommandLineArgumentProviders
  * Configure certain system properties as inputs to take advantage of UP-TO-DATE checking
  * Applies the correct pathing strategies to take full advantage of caching even if builds are executed from different locations on disk
* Make validateSourcePatterns task cacheable by removing .gradle directory from its input
2023-03-06 19:17:37 +01:00
Uwe Schindler c9401bf064
Patch class files for Java 19 code to no longer have the "preview" flag (this enables Java 19 memory segments by default) (#12033) 2022-12-26 10:07:44 +01:00
Dawid Weiss 1f741ff63c
Upgrade gradle to 7.6. (#11993) 2022-12-02 09:18:38 +01:00
Dawid Weiss 82e57d1d6b Remove obsolete badapples tests switch (#468) 2022-11-18 16:57:24 +01:00
Robert Muir b292151f21
reland: 11925 javac options (#11937)
* pass jvm args to javac  #11925

* Update net.ltgt.errorprone to the latest version so that jvm args are not overwritten, add -XX:+PrintFlagsFinal for debugging

* speed up the pure javac case too

It does not help to fork additional VMs (although error-prone will do
this since it messes with bootstrap classpath), so we avoid forking.

Instead it is best to tune org.gradle.jvmargs.

* use the flags consistently everywhere (tests and doc)

* handle the different possible alt toolchain cases

The difference is invoking 'java' versus invoking 'javac', so the args must be fed differently.

Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
2022-11-15 19:28:52 -05:00
Robert Muir 0753f48a80
Revert "speed up javac and error-prone tasks by using less resources (#11927)"
This reverts commit deab699188.

Having a shitty day: git lost changes :(
2022-11-15 19:08:43 -05:00
Robert Muir deab699188
speed up javac and error-prone tasks by using less resources (#11927)
* pass jvm args to javac  #11925
* Update net.ltgt.errorprone to the latest version so that jvm args are not overwritten, add -XX:+PrintFlagsFinal for debugging
* speed up the pure javac case too

It does not help to fork additional VMs (although error-prone will do
this since it messes with bootstrap classpath), so we avoid forking.

Instead it is best to tune org.gradle.jvmargs.

* use the flags consistently everywhere (tests and doc)

Co-authored-by: Dawid Weiss <dweiss@apache.org>
2022-11-15 19:04:17 -05:00
Robert Muir a02db83235
Revert "speed up javac and error-prone tasks by using less resources (#11927)"
This reverts commit b9c51d9a59.
2022-11-15 18:19:09 -05:00
Dawid Weiss b9c51d9a59
speed up javac and error-prone tasks by using less resources (#11927)
* pass jvm args to javac  #11925
* Update net.ltgt.errorprone to the latest version so that jvm args are not overwritten, add -XX:+PrintFlagsFinal for debugging
* speed up the pure javac case too

It does not help to fork additional VMs (although error-prone will do
this since it messes with bootstrap classpath), so we avoid forking.

Instead it is best to tune org.gradle.jvmargs.

* use the flags consistently everywhere (tests and doc)

Co-authored-by: Robert Muir <rmuir@apache.org>
2022-11-15 16:06:38 -05:00
Patrick Zhai 26ec0dd44c
add gradle aggregated coverage console log and html location (#11882)
* jacoco/ coverage shouldn't trigger all test tasks as dependencies - instead, it should run after those test tasks that you choose to run. removed java plugin from top-level.

* Make coverage depend on the default test task.

* Update jacoco log plugin so that it doesn't make hard dependencies on test tasks.

Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
2022-10-28 23:33:37 -07:00
Robert Muir 4c434b7089
make 'gradle coverage' print test coverage summaries. (#11837)
Currently, this task is too silent and just writes HTML reports. It is a
nice improvement to print the summary to the console.

Before:

```
> Task :lucene:analysis:icu:jacocoTestReport
Code coverage report at: /home/rmuir/workspace/lucene/lucene/analysis/icu/build/reports/jacoco/test/html.
```

After:

```
> Task :lucene:analysis:icu:jacocoTestReport
Code coverage report at: /home/rmuir/workspace/lucene/lucene/analysis/icu/build/reports/jacoco/test/html.

> Task :lucene:analysis:icu:jacocoLogTestCoverage
Test Coverage:
    - Class Coverage: 100%
    - Method Coverage: 87.9%
    - Branch Coverage: 82.7%
    - Line Coverage: 92.8%
    - Instruction Coverage: 92.7%
    - Complexity Coverage: 78.8%
```
2022-10-05 21:46:20 -04:00
Uwe Schindler 3b9c728ab5
MR-JAR rewrite of MMapDirectory with JDK-19 preview Panama APIs (>= JDK-19-ea+23) (#912)
This uses Gradle's auto-provisioning to compile Java 19 classes and build a multi-release JAR from them. Please make sure to regenerate gradle.properties (delete it) or change "org.gradle.java.installations.auto-download" to "true"
2022-09-26 15:22:04 +02:00
Tomoko Uchida b911d1d47c
LUCENE-10531: Add @RequiresGUI test group for GUI tests (#893)
Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
2022-05-18 09:26:06 +09:00
Robert Muir 3edfeb5eb2
LUCENE-10532: remove @Slow annotation (#832)
Remove `@Slow` annotation, for more consistency with CI and local jobs. All tests can be fast!
2022-05-09 23:03:55 -04:00
Uwe Schindler 42fe2d5620
LUCENE-10364: Prepare and update errorprone plugin for Java 17 (#590) 2022-01-07 19:19:46 +01:00
Uwe Schindler 0b517573a4
LUCENE-10342: Add logging to static initializers to warn users if unmapping or object size calculation does not work (#572)
Co-authored-by: Tomoko Uchida <tomoko.uchida.1111@gmail.com>
2021-12-29 18:18:21 +01:00
Dawid Weiss d928c47d6e
LUCENE-10338: Scan for tests only by convention file name pattern (#565) 2021-12-26 18:18:24 +01:00
Dawid Weiss a94fbb79ac LUCENE-10301: make the test-framework a proper module by moving all test
classes to org.apache.lucene.tests.*. Also changes distribution layout
(all modules are now under modules/).
2021-12-21 20:30:45 +01:00
Dawid Weiss d2c98912eb This reverts commit a7b50f723d. 2021-12-19 08:51:13 +01:00
Dawid Weiss a7b50f723d Reverting back to b48cac02. 2021-12-18 23:36:30 +01:00
Dawid Weiss ae92e96481 Address Uwe's remarks. 2021-12-16 20:05:05 +01:00
Dawid Weiss 328b3cc55f LUCENE-10255: add support for .tests subprojects which contain module tests. 2021-12-10 17:16:19 +01:00
Dawid Weiss 263765a9b0 LUCENE-10226: test target creates a weird folder (lazy property). 2021-11-09 08:34:04 +01:00
Mike Drob 23256a30fa
Replace deprecated Gradle 7.2 properties (#417) 2021-10-29 09:59:47 -05:00
Dawid Weiss 81f5b4d642
LUCENE-9660: add tests.neverUpToDate=true option which, by default, makes test tasks always execute. (#410) 2021-10-25 14:51:11 +02:00
Uwe Schindler fc475360a8 Only pass "--illegal-access=deny" up to JDK-15, later versions deprecate the option and default to "deny" 2021-09-22 19:41:59 +02:00
Dawid Weiss de45b68c90 LUCENE-9448, LUCENE-9990: fix Luke's launcher task. 2021-09-16 08:49:26 +02:00
Dawid Weiss 2b0378cd4a Use JavaInfo instead of toolchains. Internal but works and is free of toolchain's quirks. 2021-08-25 10:03:59 +02:00
Dawid Weiss 68cf86ba35 Experiments with the new apis. 2021-08-25 10:03:59 +02:00
Dawid Weiss 523cea2c5d Revert "Adding initial patch by Gautam Worah" (restore pristine main)
This reverts commit 067ab4f503aabea59639e692e3ea9ee30750c68e.
2021-08-25 10:03:59 +02:00
Dawid Weiss bac22d6116 Adding initial patch by Gautam Worah 2021-08-25 10:03:59 +02:00
Robert Muir 06907a2c12
LUCENE-9188: Add jacoco code coverage support to gradle (#119)
Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
Co-authored-by: Uwe Schindler <uschindler@apache.org>
2021-05-02 16:24:06 +02:00
Dawid Weiss 246c4beb22
LUCENE-9854: Clean up utilities to download and extract test/ benchmark data sets. (#27) 2021-03-22 12:22:39 +01:00
Dawid Weiss 53bea54669
LUCENE-9375: cleaning up post-split conditional build logic and solr refs. (#22) 2021-03-18 11:04:45 +01:00
Dawid Weiss 7f5e660395
LUCENE-9375: some build file cleanups. (#10) 2021-03-10 21:47:37 +01:00
Dawid Weiss fdf486ba54 LUCENE-9375: post-repo-split removal of solr counterpart. 2021-03-10 11:20:08 +01:00
Dawid Weiss 409bc37c13
SOLR-14759: a few initial changes so that Lucene can be built independently while Solr code is still in place. (#2448) 2021-03-08 14:59:08 +01:00
Bruno Roustant 19e6560b7f
Restore read-only permission in solr-tests.policy 2021-03-04 16:20:17 +01:00
Dawid Weiss 7dc43f46fd
LUCENE-9818: print slowest suites, add an option to enable/ disable the function from options. (#2439) 2021-03-01 16:02:18 +01:00
Robert Muir 7d3f3d61ce
Fix tests.profile output to not run many many times (#2417)
The profiler should only be invoked once at the end of the build. During
refactoring the buildFinished() hook became nested underneath stuff such
as allProjects which causes it to run too many times.
2021-02-23 06:54:39 -05:00
Tobias Kaessmann f142bf9c54
SOLR-15038: Add elevateOnlyDocsMatchingQuery and collectElevatedDocsWhenCollapsing parameters to query elevation.
Closes #2134
2021-02-17 10:54:17 +01:00
Dawid Weiss 903782d756
LUCENE-9727: build side support for running Hunspell tests. (#2313) 2021-02-08 10:50:25 +01:00
Peter Gromov 82f8d7ba1d
LUCENE-9728: Hunspell: add a performance test (#2296) 2021-02-05 09:47:02 +01:00
Peter Gromov 84aa683b6b
LUCENE-9723: Hunspell: update sanity tests that load all dictionaries (#2290) 2021-02-03 10:45:35 +01:00
Peter Gromov b48d5beb34
LUCENE-9707: Hunspell: check Lucene's implementation against Hunspel's test data (#2267) 2021-02-02 10:46:14 +01:00
zacharymorn a7747b63b4
LUCENE-8982: Make NativeUnixDirectory pure java with FileChannel direct IO flag, and rename to DirectIODirectory (#2052)
LUCENE-8982: Make NativeUnixDirectory pure java with FileChannel direct IO flag, and rename to DirectIODirectory
2021-01-17 23:57:56 +01:00
Dawid Weiss 38c9d2ab76
LUCENE-9650: disable errorprone on jdk16+ (#2171) 2020-12-28 23:20:52 +01:00
zacharymorn ebc87a8a27
LUCENE-8982: Separate out native code to another module to allow cpp build with gradle (#2068)
* LUCENE-8982: Separate out native code to another module to allow cpp build with gradle
2020-11-16 09:40:03 +01:00
Dawid Weiss 63c4dfa454 LUCENE-9596: Reproduce line for failed tests should have method-level accuracy 2020-11-03 10:56:05 +01:00