Skip to content

Allow multiple proto toolchains within a single bazel project #21012

Open
@jklukas

Description

@jklukas

What language does this apply to?

Bazel

Describe the problem you are trying to solve.

I have a monorepo using Bazel where multiple different versions of protoc need to be in the mix. I have Java code that relies on protobuf-java == 3.25.5, so want to use protoc 25.5 for java proto libraries, while I have python code that relies on an even older version of protoc.

If I try to configure the proto toolchain with one of these earlier protoc versions, it breaks other modules. For example, the latest rules_scala picks up the same protoc and produces a ScalaDeps.java that is incompatible with its own needs.

Describe the solution you'd like

I want to be able to configure multiple proto toolchains within a single bazel monorepo and select a proto toolchain at the target level, so that I can opt in subsets of my monorepo to specific older protoc versions.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions