-
Notifications
You must be signed in to change notification settings - Fork 301
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
Update to WALA 1.6.1 and remove ability to build on JDK 8 #777
Conversation
Pull Request Test Coverage Report for Build #1133
💛 - Coveralls |
This PR will take a bit more work, so converting back to draft. We currently cut release artifacts on JDK 8. In order to make this change, we'll need to switch things up so we can cut release artifacts on JDK 11 (or 17) that are compatible with JDK 8. At that point, we may as well stop supporting building NullAway on JDK 8 altogether (we can still test on JDK 8 using toolchains). Anyway, will think about how we can make this change incrementally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. I probably will want to test this internally as soon as both this and #778 land. I assume the process is just to build a local release but do so with JDK11 as the default system javac
? Anything else to test?
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](https://jakewharton.com/build-on-latest-java-test-through-lowest-java/). 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+.
Yes, after this lands, building a local release (or running |
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.