Skip to content

Add explicit includes for transitively-used std headers - #348

Merged
zzcgumn merged 1 commit into
developfrom
fix/explicit_includes
Aug 23, 2026
Merged

Add explicit includes for transitively-used std headers#348
zzcgumn merged 1 commit into
developfrom
fix/explicit_includes

Conversation

@zzcgumn

@zzcgumn zzcgumn commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A Copilot review on dds_c_api_test.cpp flagged std::snprintf used without including <cstdio> (only <cstring> was present) — fixed.
  • Swept the rest of the project's own sources with clang-tidy's misc-include-cleaner check (via the repo's compile_commands.json) to find other symbols relied on only through transitive includes.
  • Findings were filtered to genuine standard-library headers only, excluding project facade headers (e.g. api/dll.h, utility/constants.h) that are intentionally re-exported by dds_c_api.h and friends.
  • Purely additive; no behavior changes — 58 files touched, 107 lines added, 0 removed.

Test plan

  • bazel build //... — all 186 targets build clean
  • bazel test //... — all 86 tests pass

🤖 Generated with Claude Code

closes #329

The Copilot review on dds_c_api_test.cpp flagged std::snprintf used
without including <cstdio> (only <cstring> was present). Fixed that,
then swept the rest of the project's own sources with clang-tidy's
misc-include-cleaner check (via the repo's compile_commands.json) to
find other symbols relied on only through transitive includes.

Findings were filtered to genuine standard-library headers only,
excluding project facade headers (e.g. api/dll.h, utility/constants.h)
that are intentionally re-exported by dds_c_api.h and friends.

Purely additive; no behavior changes. bazel build //... and
bazel test //... both pass (186 targets, 86 tests).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QAt1cNBrEPkr8SqgAPMR73
@zzcgumn zzcgumn self-assigned this Aug 23, 2026
@zzcgumn
zzcgumn requested review from tameware and a lite review from Copilot August 23, 2026 13:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds explicit standard-library includes across DDS core, tests, utilities, Python bindings, and benchmarks, including the missing <cstdio> for std::snprintf.

Changes:

  • Adds missing standard headers to 58 C++ sources.
  • Covers core solver, transposition tables, system utilities, tests, bindings, and benchmarks.
  • No runtime behavior changes; build and test results are reported clean.

Reviewed changes

Copilot reviewed 58 out of 58 changed files in this pull request and generated no comments.

Show a summary per file
File Description
utilities/tests/dd_table_for_deal_test.cpp Updated as part of this pull request.
utilities/src/dd_table_for_deal/dd_table_for_deal_lib.cpp Updated as part of this pull request.
python/src/converters.cpp Updated as part of this pull request.
python/src/bindings.cpp Updated as part of this pull request.
library/tests/trans_table/trans_table_s_test.cpp Updated as part of this pull request.
library/tests/trans_table/trans_table_l_test.cpp Updated as part of this pull request.
library/tests/trans_table/trans_table_base_test.cpp Updated as part of this pull request.
library/tests/trans_table/test_utilities.cpp Updated as part of this pull request.
library/tests/trans_table/mock_data_generators.cpp Updated as part of this pull request.
library/tests/TestTimer.cpp Updated as part of this pull request.
library/tests/testcommon.cpp Updated as part of this pull request.
library/tests/test_timer_test.cpp Updated as part of this pull request.
library/tests/system/parallel_boards_test.cpp Updated as part of this pull request.
library/tests/solve_board/analyse_play_consistency.cpp Updated as part of this pull request.
library/tests/report_board_timings.cpp Updated as part of this pull request.
library/tests/report_board_timings_test.cpp Updated as part of this pull request.
library/tests/regression/heuristic_sorting/heuristic_sorting_test.cpp Updated as part of this pull request.
library/tests/print.cpp Updated as part of this pull request.
library/tests/parse.cpp Updated as part of this pull request.
library/tests/moves/moves_test.cpp Updated as part of this pull request.
library/tests/loop.cpp Updated as part of this pull request.
library/tests/loop_par_test.cpp Updated as part of this pull request.
library/tests/heuristic_sorting/test_utils.cpp Updated as part of this pull request.
library/tests/heuristic_sorting/minimal_weight_test.cpp Updated as part of this pull request.
library/tests/dtest.cpp Updated as part of this pull request.
library/tests/dtest_parallel.cpp Updated as part of this pull request.
library/tests/dds_c_api_test.cpp Updated as part of this pull request.
library/tests/args.cpp Updated as part of this pull request.
library/tests/args_test.cpp Updated as part of this pull request.
library/tests/ab_search/tt_lookup_test.cpp Updated as part of this pull request.
library/tests/ab_search/make3_test.cpp Updated as part of this pull request.
library/src/trans_table/trans_table_s.cpp Updated as part of this pull request.
library/src/trans_table/trans_table_l.cpp Updated as part of this pull request.
library/src/system/timer.cpp Updated as part of this pull request.
library/src/system/timer_list.cpp Updated as part of this pull request.
library/src/system/timer_group.cpp Updated as part of this pull request.
library/src/system/time_stat.cpp Updated as part of this pull request.
library/src/system/thread_mgr.cpp Updated as part of this pull request.
library/src/system/thread_data.cpp Updated as part of this pull request.
library/src/system/system.cpp Updated as part of this pull request.
library/src/system/scheduler.cpp Updated as part of this pull request.
library/src/system/parallel_boards.cpp Updated as part of this pull request.
library/src/system/memory.cpp Updated as part of this pull request.
library/src/system/file.cpp Updated as part of this pull request.
library/src/solver_if.cpp Updated as part of this pull request.
library/src/solver_context/solver_context.cpp Updated as part of this pull request.
library/src/solve_board.cpp Updated as part of this pull request.
library/src/play_analyser.cpp Updated as part of this pull request.
library/src/later_tricks.cpp Updated as part of this pull request.
library/src/init.cpp Updated as part of this pull request.
library/src/dump.cpp Updated as part of this pull request.
library/src/dds_api.cpp Updated as part of this pull request.
library/src/ab_stats.cpp Updated as part of this pull request.
library/src/ab_search.cpp Updated as part of this pull request.
benchmarks/warm_tt_benchmark.cpp Updated as part of this pull request.
benchmarks/replay.cpp Updated as part of this pull request.
benchmarks/recording.cpp Updated as part of this pull request.
benchmarks/dds_replay_main.cpp Updated as part of this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zzcgumn zzcgumn added the Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments. label Aug 23, 2026
@zzcgumn
zzcgumn merged commit 22e2352 into develop Aug 23, 2026
12 checks passed
@zzcgumn
zzcgumn deleted the fix/explicit_includes branch August 23, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing stdio.h include.

3 participants