Commit Graph

315 Commits

Author SHA1 Message Date
Robert Muir 3596e05e5c
LUCENE-9878: enable redundantNullCheck in ecjLint (#44)
Detects common cases of unreachable/dead code.

For generated javacc code, the check is disabled via
SuppressWarnings("unused") because javacc generates strange/bad code such as:

  if ("" == null)

For TestStressNRTReplication's startNode() method, the check is also
disabled because analysis folds the "test evilness controls" which are
static final constants. This itself is a WTF, shouldn't we instead
randomize these evil things in our tests rather than hardcoding them to
specific values?
2021-03-27 11:43:47 -04:00
Uwe Schindler 3538709269 Improvement for LUCENE-9881 (#46): Completely disable Eclipse plugins's eclipseJdt task and replace by owur own just copying the filtered config files. This now works correctly with inputs/outputs. 2021-03-27 12:08:12 +01:00
Robert Muir 690e256ec9
LUCENE-9881: synchronize ECJ linter with Eclipse IDE (#46)
Co-authored-by: Uwe Schindler <uschindler@apache.org>
2021-03-27 00:42:29 +01:00
Dawid Weiss f02799c511
Skip errorprone on non-nightlies. (#45) 2021-03-26 21:42:15 +01:00
zacharymorn 3ed87c867a
LUCENE-9864: Enforce @Override annotation everywhere (#40)
Requiring the annotation is helpful because if an abstract method is removed, the concrete methods will then show up as compile errors: preventing dead code from being accidentally left behind.

Co-authored-by: Robert Muir <rmuir@apache.org>
2021-03-25 17:50:38 -04:00
Dawid Weiss a38713907d LUCENE-9866: regenerate kuromoji dict in regenerate 2021-03-25 11:43:37 +01:00
Uwe Schindler 3214e365e3
LUCENE-9856: Static analysis take 3: Remove redundant interfaces (#38)
Co-authored-by: Robert Muir <rmuir@apache.org>
2021-03-24 18:26:12 +01:00
Dawid Weiss 108cd85375 Avoid creating a circular dependency between shared subtasks. 2021-03-24 16:01:36 +01:00
Dawid Weiss 4c2de7ef43 Correct soft task ordering between tidy and any other dependency of regenerate. 2021-03-24 15:39:45 +01:00
Dawid Weiss bb5db1e16d Correct snowball download/unzip sequence to be always consistent. 2021-03-24 15:39:45 +01:00
Dawid Weiss 34f589b0aa Correct run order between tidy and regenerate's deps. Make snowball not fail on Windows (just emit an error). 2021-03-24 15:39:45 +01:00
Dawid Weiss 27510d5f2f LUCENE-9862: cleanup of all regenerate tasks; moved common code into shared bit. Added failOnError for ant.patch. Included jflexStandardTokenizerImpl. 2021-03-24 15:39:45 +01:00
Robert Muir 945b1cb872
LUCENE-9856: fail precommit on unused local variables, take two (#37)
Enable ecj unused local variable, private instance and method detection. Allow SuppressWarnings("unused") to disable unused checks (e.g. for generated code or very special tests). Fix gradlew regenerate for python 3.9 SuppressWarnings("unused") for generated javacc and jflex code. Enable a few other easy ecj checks such as Deprecated annotation, hashcode/equals, equals across different types.

Co-authored-by: Mike McCandless <mikemccand@apache.org>
2021-03-23 13:59:00 -04:00
Robert Muir e6c4956cf6
Revert "LUCENE-9856: fail precommit on unused local variables (#34)"
This reverts commit 20dba278bb.
2021-03-23 12:46:36 -04:00
Robert Muir 20dba278bb
LUCENE-9856: fail precommit on unused local variables (#34)
Enable ecj unused local variable, private instance and method detection. Allow SuppressWarnings("unused") to disable unused checks (e.g. for generated code or very special tests). Fix gradlew regenerate for python 3.9 SuppressWarnings("unused") for generated javacc and jflex code. Enable a few other easy ecj checks such as Deprecated annotation, hashcode/equals, equals across different types.

Co-authored-by: Mike McCandless <mikemccand@apache.org>
2021-03-23 11:09:24 -04:00
Dawid Weiss 078d0079d1
LUCENE-9861: pull tuned vm options into a separate aspect. (#33) 2021-03-23 10:39:09 +01:00
András Salamon 2678d68be8
SOLR-14024 Invalid html generated by changes2html.pl (#31) 2021-03-22 17:35:32 -04: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 a5996dbecd Follow-up to help/validateLogCalls.txt removal. 2021-03-19 15:14:42 +01:00
Dawid Weiss c0852d1e9c Follow-up to help/ant.txt removal. 2021-03-19 15:13:55 +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 ca3de30aff
Don't cross-link between modules for interim snapshot builds. (#21) 2021-03-18 10:18:07 +01:00
Dawid Weiss f8040c0ecf LUCENE-9650: errorprone plugin doesn't work on jdk16. A different workaround that keeps the dependency. 2021-03-15 10:19:27 +01:00
Dawid Weiss 4f5389bfa8 Flush output on javadoc emitting a failure. 2021-03-12 11:39:40 +01:00
Dawid Weiss 8bbcc39583 Always include errorprone dependency, even if we're not checking. This ensures consistent use patterns across JVMs. 2021-03-11 22:27:25 +01:00
Dawid Weiss 7f5e660395
LUCENE-9375: some build file cleanups. (#10) 2021-03-10 21:47:37 +01:00
Dawid Weiss ee4871f24a make gradlew mavenToLocalRepo work. 2021-03-10 13:03:48 +01:00
Dawid Weiss fdf486ba54 LUCENE-9375: post-repo-split removal of solr counterpart. 2021-03-10 11:20:08 +01:00
Dawid Weiss b591daad38 SOLR-14759: correct build logic. 2021-03-08 15:04:20 +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
Dawid Weiss d2fb89c22f LUCENE-9793: Add task time aggregation utility (enabled with -Ptask.times=true). 2021-02-20 20:18:16 +01:00
Dawid Weiss 224843a2ba Clean up stale comments a bit. 2021-02-20 20:18:02 +01:00
Eric Pugh f70a518f1b
SOLR-8138: Simple UI for issuing SQL queries (#2381)
* Updated SOLR-8138 files for Solr 9.

This code was mostly written by Michael Suzuki,  i just tweaked it to load, and updated the version of ui-grid to the 4.10 version.

* unused file, we use the .min version.

* add an entry for the ui-grid project to license file.

Co-authored-by: epugh@opensourceconnections.com <>
2021-02-18 17:21:21 -05:00
Houston Putman 4bd4f7063b
LUCENE-9780: Only validate JARs for tasks that are enabled (#2382) 2021-02-17 18:12:27 -05:00
Kevin Watters 890f570bf5
LUCENE-9659 inequality support in payload check query (#2185)
Changes from SOLR-14787 supporting inequalities in SpanPayloadCheckQuery
2021-02-17 09:48:50 -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
Robert Muir dd91f5ca82
LUCENE-9773: upgrade icu to 68.2 (#2372)
Upgrade from icu 62.2 to 68.2, with Unicode 13 support.

Modify GenerateUTR30DataFiles to take the release tag as a program
argument. Gradle populates this automatically, removing a manual step
from regeneration process.
2021-02-15 14:56:13 -05:00
Dawid Weiss 8f56ae0a4b
LUCENE-9767: infrastructure for icu regeneration in place. (#2362) 2021-02-14 21:07:39 +01:00
Dawid Weiss f7e42bdb35
LUCENE-9768: Add source sets for src/tools, clean up forbidden API and formatting errors (#2361) 2021-02-12 17:03:54 +01:00
Dawid Weiss d89cb72fa7 Remove leftover debug statement. 2021-02-12 17:02:30 +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
Peter Gromov 8a34cc7afd
LUCENE-9701: Hunspell: implement simple REP-based suggestion algorithm (#2251) 2021-02-01 10:23:54 +01:00
Eric Pugh 6d71a0aced
SOLR-14067: v4 Create /contrib/scripting module with ScriptingUpdateProcessor (#2257)
* Creating Scripting contrib module to centralize the less secure code related to scripts.

* tweak the changelog and update notice to explain why the name changed and the security posture thinking

* the test script happens to be a currency.xml, which made me think we were doing something specific to currency types, but instead any xml formatted file will suffice for the test.

* Update solr/contrib/scripting/src/java/org/apache/solr/scripting/update/ScriptUpdateProcessorFactory.java

* Update solr/contrib/scripting/src/java/org/apache/solr/scripting/update/package-info.java

* drop the ing, and be more specific on the name of the ref guide page

* comment out the script update chain.

The sample techproducts configSet is used by many of the solr unit tests, and by default doesn't have access to the jar file in the contrib module.   This is commented out, similar to how the lang contrib is.

* using a Mock for the script processor in order to keep the trusted configSets tests all together.

* tweak since we are using a mock script processor

Co-authored-by: David Smiley <dsmiley@apache.org>
2021-01-29 12:27:36 -05:00
Mike Drob b335034615
Require Thread Names in Solr (#2264)
When we are creating a new thread we should give it a descriptive name and enforce this via ForbiddenAPIs. This doesn't apply to Runnable or Callable objects that we pass to an executor, since those should be getting named by the executor itself.

We don't require this in tests because the tests should be more self contained and there is less benefit in descriptive names. If somebody is already profiling a test, then they likely have the context to understand what the unnamed threads are doing, whereas a thread dump from a running Solr instance should have good thread names for everything. This is especially helpful when doing profiling, otherwise we end up with a bunch of Thread-# that are hard to tell apart and search on.
2021-01-28 15:04:15 -06:00