bazelbuild / bazelbuild/bazel

Allow completely disabling Error Prone

Open
#25,558 4 comments 0 reactions 0 assignees View on GitHub
P3 team-Rules-Java type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the feature request:

Hi.

Back in https://github.com/bazelbuild/bazel/commit/58dc6b98f92c88bd788b6459a2e26101c99f245a, the `--extra_checks:off` flag that allowed completely disabling Error Prone was removed, in favor of the `-XepDisableAllChecks` flag, which runs EP but disables all checks.

I just ran into https://github.com/google/error-prone/issues/4656 when trying to upgrade to the Java 24 EA build, despite our build disabling EP via `-XepDisableAllChecks`.

I think it would be nice to be able to disable EP completely, so we wouldn't be affected by this type of issue in the future coming from a tool we don't use, especially since upgrading EP requires also upgrading Bazel.

Would it be possible to add an option to completely disable EP back to Bazel?

### Which category does this issue belong to?

Java Rules

### What underlying problem are you trying to solve with this feature?

Avoiding an unnecessary dependency on Error Prone which can block us from upgrading Java

### Which operating system are you running Bazel on?

_No response_

### What is the output of `bazel info release`?

7.5.0

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

```text

```

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing Bazel's Java Rules integration with Error Prone and reviewing commit 58dc6b98f92c88bd788b6459a2e26101c99f245a, which removed --extra_checks:off. Compare that behavior with -XepDisableAllChecks and the Java 24 failure described in Error Prone issue 4656. Done means Bazel can bypass Error Prone entirely without blocking Java upgrades, with coverage for the new option.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.