Skip to content

Enable -Weverything warnings and add optional active_message field#3

Merged
dallison merged 7 commits into
mainfrom
active_message_and_warnings
Jun 2, 2026
Merged

Enable -Weverything warnings and add optional active_message field#3
dallison merged 7 commits into
mainfrom
active_message_and_warnings

Conversation

@dallison

@dallison dallison commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Compile Phaser's own code under clang's -Weverything, with a curated set of -Wno-* opt-outs in phaser/copts.bzl for non-actionable diagnostics (C++ back-compat, padding, vtable emission, intentional offset/size conversions, etc.). Third-party headers are treated as system headers via --features=external_include_paths.
  • Fix all resulting in-repo warnings: a bug-prone shadowed UnionInfo::binary_size, potential-UB shift-negative-value / undefined-reinterpret-cast, deprecated implicit copy ops on Message/Field, plus extra-semi, unused params/functions, ignored [[nodiscard]], missing initializers, and ~20 nested-scope shadow renames in tests.
  • Add an optional public std::any active_message field to generated message types, enabled via phaser_library(enable_active_message = True) or the active_message=true plugin command-line option. Off by default (no change to existing output).

Test plan

  • bazel test //... (6 targets) passes
  • Full in-repo -Weverything recompile is warning-clean
  • New //phaser:active_message_test verifies the field defaults empty, holds a payload, and resets
  • Generated header confirmed to emit #include <any> and std::any active_message; only when enabled

@dallison dallison merged commit 9a4d70f into main Jun 2, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

1 participant