fix(session): keep the request types out of an anonymous namespace

Session::State has module linkage, and six of its members take Job or
Waiter, which lived in an anonymous namespace: clang warned on each
build that a TU-local entity was exposed (-WTU-local-entity-exposure).
They move to a named namespace, SessionImpl, which this file alone uses
and nothing exports. No behaviour changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-11-01 03:06:25 +01:00
commit 29f1eed9ab
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB

View file

@ -16,7 +16,10 @@ import :Session;
using namespace Crafter::Debug; using namespace Crafter::Debug;
using Crafter::Debug::Detail::Exchange; using Crafter::Debug::Detail::Exchange;
namespace { // Named, not anonymous: Session::State's members take these types, and a
// type with internal linkage in the signature of one with module linkage is
// an exposure clang warns about. Nothing here is exported.
namespace Crafter::Debug::SessionImpl {
using Clock = std::chrono::steady_clock; using Clock = std::chrono::steady_clock;
// Request parameters, decoded through Codec so a mistyped request is // Request parameters, decoded through Codec so a mistyped request is
@ -245,6 +248,8 @@ namespace {
}; };
} }
using namespace Crafter::Debug::SessionImpl;
namespace Crafter::Debug { namespace Crafter::Debug {
struct Session::State { struct Session::State {
SessionOptions options; SessionOptions options;