Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aaronsky opened this issue Jul 30, 2024 · 2 comments

Comments

@aaronsky
Copy link

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

@derekmauro
Copy link
Member

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

@derekmauro
Copy link
Member

derekmauro commented Jul 30, 2024

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

copybara-service bot pushed a commit to abseil/abseil-cpp that referenced this issue Aug 1, 2024
This updates to a version of GoogleTest that fixes
google/googletest#4581
for downstream users of rules_python

PiperOrigin-RevId: 658398482
Change-Id: I4c6d431fd38d3a108e3c252eb26be9d81ff05a8e
derekmauro added a commit to derekmauro/abseil-cpp that referenced this issue Aug 1, 2024
This updates to a version of GoogleTest that fixes
google/googletest#4581
for downstream users of rules_python

Cherry-pick of d0159ea
derekmauro added a commit to abseil/abseil-cpp that referenced this issue Aug 1, 2024
This updates to a version of GoogleTest that fixes
google/googletest#4581
for downstream users of rules_python

Cherry-pick of d0159ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants