Skip to content

Bug in root module detection #130

Description

@gleyba

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions