Dawid Weiss
2f21a866c1
Add star import check/validation ( #11949 )
...
* Remove some old cruft that only slows down checks. Add star import check
* Expand wildcard imports to comply with the rule.
2022-11-18 16:42:59 +01:00
Robert Muir
1b9d98d6ec
enable error-prone "narrow calculation" check ( #11923 )
...
This check finds bugs such as https://github.com/apache/lucene/pull/11905 .
See https://errorprone.info/bugpattern/NarrowCalculation
2022-11-15 06:42:41 -05:00
Dawid Weiss
5c7edd7f38
Upgrade to gradle 7.5.1 (excluding launch scripts, which we have customized) ( #11886 )
2022-10-28 08:49:36 +02:00
Uwe Schindler
df94e6c005
Clean up MR-JAR build, so we do not have hardcoded "19" everywhere in validation tasks ( #11835 )
...
As long as soureSets are named "mainXX", with XX a feature version, we check everything automatically:
- ECJ is disabled (we can't do a check without forking ECJ as a separate process using toolkit, we may support this later)
- forbiddenapis (we disable checks for missing classes)
- errorprone is disabled (errorprone does not work correctly at moment with forked compiler)
2022-10-02 20:41:46 +02:00
Uwe Schindler
e5a226ec7c
For now only use bundled signatures from minJavaVersion ( #11834 )
...
# Conflicts:
# gradle/validation/forbidden-apis.gradle
2022-10-02 17:54:11 +02:00
Uwe Schindler
aae293437f
Upgrade forbiddenapis to 3.4 ( #11834 )
2022-10-02 16:42:36 +02: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
Dawid Weiss
5d121ce44c
Upgrade several build dependencies. ( #11812 )
...
* Upgrade several build dependencies.
* Update error prone rules (those are off but they do trigger warnings/ errors)
* A few corrections I made before I turned off new warnings. Let's do nother issue to fix them.
2022-09-25 17:10:22 +02:00
Dawid Weiss
54fba99cb1
Upgrade google java format and apply tidy ( #11811 )
2022-09-24 15:40:27 +02:00
Marios Trivyzas
dbffe3472b
LUCENE-10423: Remove usages of System.currentTimeMillis() from tests ( #11749 )
...
* Remove usages of System.currentTimeMillis() from tests
- Use Random from `RandomizedRunner` to be able to use a Seed to
reproduce tests, instead of a seed coming from wall clock.
- Replace time based tests, using wall clock to determine periods
with counter of repetitions, to have a consistent reproduction.
Closes : #11459
* address comments
* tune iterations
* tune iterations for nightly
2022-09-06 17:55:01 -04:00
Uwe Schindler
831ae2465b
Remove the deflater hack introduced because of JDK-8252739 ( #977 )
...
This bug was fixed in JDK-16 so it does not apply to main branch (Java 17) anymore.
2022-06-24 14:23:10 +02:00
Uwe Schindler
7a8071c9d4
Detect CI builds and enable errorprone by default for those CI builds ( #890 )
2022-05-14 20:49:50 +02:00
Dawid Weiss
75aadb9589
gradle 7.3.3 quick upgrade ( #856 )
2022-04-29 21:02:19 +02:00
Dawid Weiss
a53d05b9f9
Upgrade spotless and use runToFixMessage for 'gradlew tidy' hint. ( #834 )
2022-04-25 14:51:14 +02:00
Robert Muir
d6461eab0b
improve spotless error to suggest running 'gradlew tidy' ( #817 )
...
The current error isn't helpful as it suggests a per-module command. If
the user has modified multiple modules, they will be running gradle
commands to try to fix each one of them, when it would be easier to just
run 'gradlew tidy' a single time and fix everything.
2022-04-21 08:30:10 -04:00
Dawid Weiss
ba1062620c
LUCENE-10510: Check module access prior to running gjf/spotless tasks ( #802 )
2022-04-10 20:35:45 +02:00
Uwe Schindler
ff263f0aa4
Upgrade to forbiddenapis 3.3 ( #768 )
2022-03-26 17:09:42 +01:00
Mike Drob
b3906e96ea
LUCENE-9651 Update benchmark module docs ( #759 )
2022-03-23 14:51:28 -05:00
Dawid Weiss
8aa4763070
LUCENE-10419: fix rat thread safety bug.
2022-02-13 18:43:13 +01:00
Dawid Weiss
a861ff8df2
LUCENE-10419: revert debugging changes.
2022-02-13 18:34:57 +01:00
Dawid Weiss
50b7e2970f
LUCENE-10419: more debugging code. The message from AbstractStringBuilder suggests a concurrency issue somewhere, but I just can't see it!
2022-02-12 20:22:49 +01:00
Dawid Weiss
1f1da12c89
LUCENE-10419: add debugging code.
2022-02-10 12:03:54 +01:00
Dawid Weiss
87bba4152c
LUCENE-10283: bump the minimum source/release in ecj linter settings.
2022-02-02 17:25:41 +01:00
Adrien Grand
2ebc57a465
LUCENE-10283: Bump minimum required Java version to 17. ( #579 )
...
Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
2022-01-10 15:42:15 +01:00
Uwe Schindler
42fe2d5620
LUCENE-10364: Prepare and update errorprone plugin for Java 17 ( #590 )
2022-01-07 19:19:46 +01:00
Dawid Weiss
ff547e7bbd
LUCENE-10328: Module path for compiling and running tests is wrong ( #571 )
2022-01-05 20:42:02 +01:00
Uwe Schindler
475fbd0bdd
LUCENE-10352: Convert TestAllAnalyzersHaveFactories and TestRandomChains to a global integration test and discover classes to check from module system ( #582 )
...
Co-authored-by: Robert Muir <rmuir@apache.org>
2022-01-05 15:35:02 +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
e790125504
LUCENE-10331: don't emit the contents of the inputs file until we're actually running the task ( #554 )
2021-12-20 19:27:37 +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
2a44ff532e
LUCENE-10308: sort input files for ecj so that module-info.java comes first.
2021-12-18 21:17:56 +01:00
Uwe Schindler
db9dff225c
after reading code, correct the argument file to comply with ECJ's parser
2021-12-17 12:18:28 +01:00
Uwe Schindler
6941701c6d
Escape the options in ECJ's options file
2021-12-17 11:37:27 +01:00
Dawid Weiss
5b3b75efd8
LUCENE-10308: Make ecj and javadoc run with modular paths
2021-12-16 17:51:01 +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
6d83c2e08e
LUCENE-10255: add gradle compilation and module descriptor support for the java module system. Adds module descriptors to all Lucene subprojects.
2021-12-10 17:16:19 +01:00
Dawid Weiss
8367f700c7
LUCENE-10294: Avoid compiling javadocs twice in 'gradlew check'.
2021-12-09 09:56:11 +01:00
Robert Muir
63c89f678d
Speed up ECJ tasks by avoiding --release ( #484 )
...
LUCENE-10185 caused a large performance regression in ECJ tasks by using the --release flag.
Instead of using --release, we can just disable "terminal deprecation", and leave this check to `javac`. The --release flag makes this tool run 50% slower.
2021-11-28 15:10:32 -05:00
Dawid Weiss
1029651d12
Don't log warnings from ant (different class loader, I guess). Makes Alan happier.
2021-11-26 11:39:55 +01:00
Uwe Schindler
1ae6b2a6b9
UCENE-10218: Extend validateSourcePatterns task to scan for LTR/RTL unicode to catch "Trojan Source" source code attacks ( #425 )
...
Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
2021-11-03 17:19:24 +01:00
Dawid Weiss
d819a2eec4
Cherry pick the validateSourcePatterns. Correct exclusion patterns (.gradle and .idea are only at the root project level).
2021-11-02 12:18:51 +01:00
Jerome Prinet
d44e03b8b0
Make ratTask cacheable
2021-11-02 12:18:51 +01:00
Dawid Weiss
6d8ea58ccd
LUCENE-10200: Rename pddl-10.txt to reference glove.
2021-10-31 10:41:16 +01:00
Mike Drob
23256a30fa
Replace deprecated Gradle 7.2 properties ( #417 )
2021-10-29 09:59:47 -05:00
Dawid Weiss
62eb9a809e
LUCENE-10200: remove unused dangling license exclusions. Add references to the remaining ones.
2021-10-27 20:40:39 +02:00
Robert Muir
f8d431ae44
LUCENE-10185: pass --release 11 to ECJ linter, fix JDK 17 build ( #393 )
...
* LUCENE-10185: pass --release 11 to ECJ linter, fix JDK 17 build
Otherwise, new java releases such as JDK 18, JDK 19, ... may have even
more new deprecations, the build shouldn't fail in such cases.
Remove -source/-target now that we pass --release
Fix casting so ECJ understands it and creates correct call signature (UweSays: "It's ok. I know why it happens, but it's a bug in ECJ. The type safety is checked by the invokeexact")
Co-authored-by: Uwe Schindler <uschindler@apache.org>
2021-10-18 16:43:53 -04:00
Dawid Weiss
a613021ca4
LUCENE-10136: allow 'var' declarations in source code (be reasonable though). ( #368 )
2021-10-08 20:20:22 +02:00
Dawid Weiss
4d0fabf53b
LUCENE-9713: we don't need those symbol-escape checks. They're valid adoc and we don't produce PDFs.
2021-09-30 15:27:56 +02:00
Dawid Weiss
93c66e1400
LUCENE-9713: exclude .idea/ (sync with Solr's version).
2021-09-30 15:19:19 +02:00