Skip to content

[FR]: Keep explicit toolchain registration as the recommended default #80

Open
@aran

Description

@aran

What is the current behavior?

#75 makes the recommended example registration of toolchains_protoc cleaner and simpler but makes it vulnerable to Bazel's surprising toolchain registration rules.

Describe the feature

bazel_dep looks a lot like it should be side-effect-free even though it's not. (Room for improvement in Bazel itself.) Our MODULE.bazel, for example, sorts our bazel_deps alphabetically for example near the top of the file. If users install toolchains_protoc in the new order-dependent way without explicit toolchain override, they're vulnerable to extremely surprising behavior where innocent reordering of bazel_dep calls can trigger a toolchain switch with commensurate build time regression. This is obviously just a matter of opinion but it's probably safer to recommend the more verbose boilerplate with explicit toolchain selection.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions