Skip to content

Cannot fix or prevent javac fallbacks when using --experimental_java_classpath=bazel #24875

@rsalvador

Description

@rsalvador

Description of the feature request:

Introduce an option to fail the build if javac fails to compile with the reduced classpath while using --experimental_java_classpath=bazel.

Which category does this issue belong to?

Java Rules

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

In our large Java monolith, certain modules often fail to compile with the reduced classpath, triggering an additional build action with the full transitive classpath. We want to fix these fallbacks but need a way to identify the reasons for their occurrence. By failing the build, this feature would:

  1. Expose javac errors and identify missing dependencies.
  2. Prevent new fallbacks from being introduced.

Which operating system are you running Bazel on?

MacOS and Linux

What is the output of bazel info release?

7.4.1

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 ?

No response

Have you found anything relevant by searching the web?

No

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)team-Rules-JavaIssues for Java rulestype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions