In buf/extensions.bzl, there are such lines:
if toolchains.name != _DEFAULT_TOOLCHAIN_NAME and not mod.is_root:
fail("""\
Only the root module may override the default name for the buf toolchains.
This prevents conflicting registrations in the global namespace of external repos.
""")
I guess it should be
if toolchains.name == _DEFAULT_TOOLCHAIN_NAME and not mod.is_root:
fail("""\
Only the root module may override the default name for the buf toolchains.
This prevents conflicting registrations in the global namespace of external repos.
""")
There is already protovalidate non-root module overriding default toolchain version
https://github.com/bufbuild/protovalidate/blob/main/MODULE.bazel#L37
In
buf/extensions.bzl, there are such lines:I guess it should be
There is already
protovalidatenon-root module overriding default toolchain versionhttps://github.com/bufbuild/protovalidate/blob/main/MODULE.bazel#L37