api: namespace generated bindings — x3d::core + x3d::nodes (API-1 + API-2)#26
Merged
Conversation
…h qualified node casts (ADR-0039)
… (escaped .gitignore after ADR-0039 move)
…R-0039) The 14 failing tests were asserting on the old flat output layout and pre-namespace header content. The emitter output is correct; the tests were stale. Updated: - test_emission.py: rendered fixture writes core headers (X3Dtypes.hpp, X3Denums.hpp) to x3d/core/; _read() routes core headers to x3d/core/ and all node headers/.cpp to x3d/nodes/. - test_decl_def_split.py: factory source include-path assertions updated to x3d/nodes/ spelling; node header/source reads routed to x3d/nodes/. - test_enums.py: #ifndef include guard assertion replaced with #pragma once + namespace x3d::core check to match the new gen_enums_header output. - test_golden_smoke.py: golden and produced paths now resolve through x3d/core/ (X3Dtypes.hpp) or x3d/nodes/ (Box.hpp); write_types_header targets x3d/core/; generate_cpp_bindings called with namespace="x3d::nodes" to match the committed golden. - test_version.py: synthetic-4.1 tests write core headers to x3d/core/, read QuantumWidget.hpp from x3d/nodes/, and read X3Denums.hpp from x3d/core/.
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.
Moves the 685 generated binding types out of the global namespace into two namespaces, physically mirrored by header subdirs. Closes API-1 (global-namespace dump) and API-2 (flat install layout). Design:
docs/superpowers/specs/2026-06-27-namespace-generated-bindings-design.md; rationale: ADR-0039.What changed
x3d::core(generated_cpp_bindings/x3d/core/) — the value/reflection vocabulary:SF*/MF*types,FieldInfo/FieldTable/NodeVisitor/RangeDiagnostic/X3DFieldType/AccessType, bounded enums.x3d::nodes(generated_cpp_bindings/x3d/nodes/) —X3DNodebase, all abstractX3D*Node, all concrete node classes, the factory, the interface registry.#pragma once; uniform include spelling in-tree and installed (#include "x3d/nodes/Transform.hpp"). Cross-namespace seam:x3d::core::SFNode = std::shared_ptr<x3d::nodes::X3DNode>.using namespace x3d::core;for the small vocabulary set (scoped, never global), but explicitx3d::nodes::Foo/ a per-filenamespace xn = x3d::nodes;alias for the 685 node types — no blanket nodes directive. Thex3d::sdkfaçade re-exportscore+nodesaliases.X3D string identity is unchanged (
nodeTypeName()still returns"Transform"); the binding-hash golden was re-blessed, the behavioral goldens/conformance view did not change.Scope
~190 consumer files (qualification + include paths), the emitter (
src/x3d_cpp_gen/), CMake layout/install, and the out-of-band tooling that read generated artifacts by hardcoded flat path (conformance scanner,.gitignore, the generator's pytest suite).Verification
mise run cigreen: 111/111 ctests (incl. the newx3d_namespace_taxonomylock test), 305 pytest passed, golden + conformance-gate + coverage-gate (39 ADRs) pass, cli-gate-regression no regressions (+1 improvement). Strictmise run docs-buildclean.Merge is yours.