Skip to content

[Bug]: has_absl should default to true when using bzlmod #4953

@shahms

Description

@shahms

Describe the issue

Currently, the documented method of printing values via AbslStringify only works if you set -DGTEST_HAS_ABSL. However, when using googletest from the BCR, this dependency is unconditional yet the define still defaults to off, pulling in the dependency but not actually using it.

Steps to reproduce the problem

  1. Add bazel_dep(name = "googletest", version = "1.17.0.bcr.2") to MODULE.bazel
  2. Define a custom AbslStringify for a type.
  3. Have a test fail using that type.
  4. Be surprised when the wrong value is printed or compilation fails (depending on the type).

What version of GoogleTest are you using?

googletest-1.17.0.bcr.2

What operating system and version are you using?

macos 25.3.0

What compiler and version are you using?

clang 19.1.3

What build system are you using?

bazel 9.0.0

Additional context

No response

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