Skip to content

[WIP] Update Error Prone for ThreadSafe analysis #34861

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjvanrossum
Copy link
Contributor

@sjvanrossum sjvanrossum commented May 6, 2025

Update the Error Prone and Error Prone Gradle plugin versions. Error Prone 2.19.0 introduced a thread safety checker (compatible with Error Prone's @ThreadSafe annotation) which provides a few automated checks based on e.g. @GuardedBy annotations.

This should help catch obvious thread safety issues in annotated code undergoing maintenance/refactoring.

Error Prone's minimum supported compiler release was bumped from 8 to 11 between 2.10.0 and 2.19.0 and from 11 to 17 between 2.19.0 and 2.38.0. Additionally, Beam now fails to build because of new, updated and fixed checkers. This PR should address compiler (17+) and target release (8+) versioning requirements (e.g. using Gradle toolchains or --release flag) and silence new Error Prone warnings (e.g. by temporarily disabling or fixing issues). Note that ThreadSafeChecker is published, but not supported in any current release of Error Prone (google/error-prone#4833).

This PR might take a while, but hopefully makes these changes easier to manage going forward.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant