Enable DDS_AB_STATS via --define=ab_stats=true.#208
Merged
Conversation
Wire a Bazel config_setting into DDS_LOCAL_DEFINES so AB stats can be turned on without --cxxopt=-DDDS_AB_STATS; refresh MODULE.bazel.lock. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes it possible to enable alpha-beta (AB) search statistics through a Bazel --define flag, so developers no longer need to pass --cxxopt=-DDDS_AB_STATS manually. This aligns with Issue #198’s request to standardize feature toggles via Bazel configuration.
Changes:
- Adds a root-level Bazel
config_settingnamedab_statsdriven by--define=ab_stats=true. - Wires that
config_settingintoDDS_LOCAL_DEFINESsoDDS_AB_STATSis set automatically when enabled. - Updates documentation in
debug.hand refreshesMODULE.bazel.lock.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
BUILD.bazel |
Introduces config_setting(name = "ab_stats") keyed off --define=ab_stats=true. |
CPPVARIABLES.bzl |
Adds a select() arm to inject DDS_AB_STATS into DDS_LOCAL_DEFINES when //:ab_stats matches. |
library/src/utility/debug.h |
Documents the Bazel flag to enable AB stats. |
MODULE.bazel.lock |
Updates Bazel module lock metadata consistent with dependency resolution changes. |
zzcgumn
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wire a Bazel config_setting into DDS_LOCAL_DEFINES so AB stats can be turned on without --cxxopt=-DDDS_AB_STATS; refresh MODULE.bazel.lock.
Addresses Issue #198