Move the runtime include root from smithy/ to opal/ (#201, ADR-0024) - #209
Conversation
Surface 2 of 3. runtime/include/smithy/ and runtime/testing/include/smithy/ become opal/; every #include, the include guards, the SMITHY_* macro prefix (OPAL_E2E_HAVE_BEAST) and the runtime's own "opal: " log prefix follow. The codegen emitters print the new paths and the goldens are regenerated from them, byte-identical on a second run. The rules-test fixture's smithy/cpp/ruletest/ headers stay: they derive from its model's namespace, not from the runtime. SMITHY_COPTS and the Bazel module name are surface 3.
ReviewLGTM — surface 2 of #201 is scoped correctly and complete on What looks right
Should-fix (docs)
Nit (non-blocking)
No correctness issues found; happy to see this land. |
… prefix The two Fatal examples in the docs still read smithy: after the runtime moved to opal:; the CHANGELOG entry read as if the macro prefix were still SMITHY_*, and the surface-1 entry still said the include root was yet to move.
|
Follow-up |
Part of #201, surface 2 of 3 per ADR-0024 (#207 was the namespace; the Bazel module follows). The issue closes with the third.
What
The runtime's public headers move from
runtime/include/smithy/toruntime/include/opal/, and the test helpers fromruntime/testing/include/smithy/testing/toopal/testing/:Everything that derives from the include root follows it:
SMITHY_HTTP_TRANSPORT_H_→OPAL_HTTP_TRANSPORT_H_, across the runtime and the hand-written examples.SMITHY_*macro prefix: the one non-guard macro,SMITHY_E2E_HAVE_BEAST, is nowOPAL_E2E_HAVE_BEAST.smithy:→opal:on the stderr/clog lines the runtime writes for itself (Fatal, callbacks that threw, the Beast io-thread catch). It names the library that wrote the line, so it moves with the library."opal/..."includes and the goldens are regenerated from them, not edited — a secondgradle generateFixtures generateProtocolTestson this head is byte-identical.docs/versioning.md's compatibility surface Phase 0: project foundations #3 (runtime/include/opal/**), and comments that cite a header by path.Unchanged, by design: the Bazel module
@smithy_cppandSMITHY_COPTS(surface 3), and the rules-test fixture'ssmithy/cpp/ruletest/headers. Those derive from the fixture's model namespace (smithy.cpp.ruletest), not from the runtime, so the sweep was constrained to the runtime's directories there. Same rule as #207'ssmithy::cpp::ruletest, and the CHANGELOG entry spells out that constraint for a consumer in the same position.Churn to expect
"opal/…"sorts differently from"smithy/…"under Google-style include regrouping, so clang-format reordered include blocks in many files. Generated code sorts its own includes, so the golden diff is a pure path substitution.Testing
bazel test //... --config=werror: 129 tests pass.examples/bazel-consumer(the out-of-tree module): 15 tests pass, with only the#includesubstitution applied to its sources — which is the migration the CHANGELOG claims.--config=noexceptbuild of every runtime library passes.cd codegen && gradle build spotlessCheckpasses; the Java tests that assert on emitted includes were updated to the new paths.git diff --exit-code -- '*/generated/*'after a second run is empty).No new tests: the change has no new behavior. Every existing suite compiles against the new root, and the consumer module is the acceptance test for the migration recipe.
Checklist
bazel test //...and(cd codegen && gradle build spotlessCheck)pass locally🤖 Generated with Claude Code
https://claude.ai/code/session_01Jj5X2fKdgrYurHmbwLzUiQ
Generated by Claude Code