Skip to content

[Bug]: Python toolchain in MODULE.bazel conflicts with downstream registered versions #4581

Closed

Description

@aaronsky

Describe the issue

Forgive me if this has already been reported.

In 1.15.0 of googletest, when using Bzlmod and rules_python to register a toolchain, this line in googletest's MODULE.bazel interferes with any other subsequently registered toolchains. This is consistent with this disclaimer:

IMPORTANT: this should only be done in a root module, and may intefere with the toolchains rules_python registers.

Given that this makes googletest impossible to use in a repository with both C++ and Python, it would be great to see this line removed.

Steps to reproduce the problem

  1. Take the rules_python bzlmod example. Add googletest 1.15.0 as a bazel_dep to the MODULE.bazel.
  2. Try running any tests in that project.
  3. Observe that the Python toolchain used is the system Python, not either of the toolchains registered in MODULE.bazel.

What version of GoogleTest are you using?

1.15.0

What operating system and version are you using?

macOS 14.5

What compiler and version are you using?

python

What build system are you using?

N/A

Additional context

No response

Activity

  1. derekmauro commented on Jul 30, 2024

    @derekmauro
    Member

    Thank you for reporting. It looks like you are correct. This will be patched soon.

  2. derekmauro commented on Jul 30, 2024

    @derekmauro
    Member

    Expect to see a 1.15.1 patch release soon. (Edit: Actually fixed in 1.15.2)

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