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

Update to WALA 1.6.1 and remove ability to build on JDK 8 #777

Merged
merged 23 commits into from
Jul 8, 2023

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Jun 27, 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 msridhar marked this pull request as draft June 27, 2023 22:53
@coveralls
Copy link

coveralls commented Jun 27, 2023

Pull Request Test Coverage Report for Build #1133

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.808%

Totals Coverage Status
Change from base Build #1132: 0.0%
Covered Lines: 5613
Relevant Lines: 6048

💛 - Coveralls

@msridhar msridhar marked this pull request as ready for review June 27, 2023 22:58
@msridhar msridhar marked this pull request as draft June 27, 2023 23:18
@msridhar
Copy link
Collaborator Author

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.

@msridhar msridhar changed the title Update to WALA 1.6.1 Update to WALA 1.6.1 and remove ability to build on JDK 8 Jul 1, 2023
@msridhar msridhar changed the base branch from master to test-8-on-11 July 2, 2023 23:07
@msridhar msridhar marked this pull request as ready for review July 2, 2023 23:08
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.

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?

msridhar added a commit that referenced this pull request Jul 8, 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](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+.
Base automatically changed from test-8-on-11 to master July 8, 2023 18:04
@msridhar
Copy link
Collaborator Author

msridhar commented Jul 8, 2023

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?

Yes, after this lands, building a local release (or running ./gradlew build) will only work on JDK 11+. Using any JDK version 11 or newer should work for building a release; it doesn't have to be 11. I would specifically test that any workflows involving JarInfer still run correctly.

@msridhar msridhar enabled auto-merge (squash) July 8, 2023 18:17
@msridhar msridhar disabled auto-merge July 8, 2023 18:23
@msridhar msridhar merged commit 188632b into master Jul 8, 2023
6 checks passed
@msridhar msridhar deleted the wala-update branch July 8, 2023 18:24
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.

3 participants