Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tasks to run JDK 8 tests on JDK 11+ #778

Merged
merged 8 commits into from
Jul 8, 2023
Merged

Add tasks to run JDK 8 tests on JDK 11+ #778

merged 8 commits into from
Jul 8, 2023

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Jun 28, 2023

This PR adds tasks to additionally run certain test suites on JDK 8, even when we are building on a JDK 11+ JVM. The approach is described here. This moves us towards only supporting building NullAway on JDK 11+, while still targeting Java 8 (so NullAway can still be used on JDK 8). This will help us with keeping build tooling and dependencies up to date, as more and more tools and plugins do not support running on JDK 8.

Specifically, we run the core NullAway tests and the tests from guava-recent-unit-tests on JDK 8. We do not run JarInfer tests, as we intend to remove the ability to run JarInfer on JDK 8 (see #777). Also, we only create the relevant test tasks when the Error Prone version being used is 2.4.0 (compatible with Java 8). We have one CI job, Java 11 + EP 2.4.0, that exercises this scenario. I confirmed locally that when running the testJdk8 tasks, the tests are running on a JDK 8 JVM.

Additionally, the PR contains a minor tweak that allows publishToMavenLocal to work when Gradle is run on JDK 11+.

@coveralls
Copy link

coveralls commented Jun 28, 2023

Pull Request Test Coverage Report for Build #1130

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 92.758%

Totals Coverage Status
Change from base Build #1121: 0.001%
Covered Lines: 5610
Relevant Lines: 6048

💛 - Coveralls

@msridhar msridhar changed the title [WIP] Run JDK 8 tests on JDK 11 Add tasks to run JDK 8 tests on JDK 11 Jun 28, 2023
@msridhar msridhar marked this pull request as ready for review June 28, 2023 19:29
@msridhar msridhar changed the title Add tasks to run JDK 8 tests on JDK 11 Add tasks to run JDK 8 tests on JDK 11+ Jul 7, 2023
Copy link
Collaborator

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@msridhar msridhar merged commit ec64e82 into master Jul 8, 2023
9 checks passed
@msridhar msridhar deleted the test-8-on-11 branch July 8, 2023 18:04
msridhar added a commit that referenced this pull request Jul 8, 2023
WALA now runs on JDK 17. So, with this update, we can run our full build
on JDK 17, including JarInfer. Since WALA has required JDK 11 since
version 1.6.0, JarInfer now requires a JDK 11 VM to run, and will no
longer run on JDK 8. In order to get everything to build with this new
dependence, we have removed support for building on JDK 8. NullAway
itself will still run as part of a JDK 8 build (and it still tested
there, see #778), but running JarInfer now requires JDK 11. Much of this
PR is cleanup enabled by removing support for building on JDK 8.
msridhar added a commit to msridhar/NullAway that referenced this pull request Jul 18, 2023
msridhar added a commit to msridhar/NullAway that referenced this pull request Jul 18, 2023
msridhar added a commit to msridhar/NullAway that referenced this pull request Jul 19, 2023
msridhar added a commit to msridhar/NullAway that referenced this pull request Jul 19, 2023
msridhar added a commit to msridhar/NullAway that referenced this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants