Skip to content

Rename the Bazel module from smithy_cpp to opal_cpp (#201, ADR-0024) - #210

Merged
aaylward merged 2 commits into
mainfrom
claude/kind-fermi-elfabg-201-3
Sep 9, 2026
Merged

aaylward merged 2 commits into
mainfrom
claude/kind-fermi-elfabg-201-3

Conversation

@aaylward

@aaylward aaylward commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #201. Surface 3 of 3 per ADR-0024 (#207 namespace, #209 include root). The repository itself is not renamed here.

What

The Bazel module is opal_cpp:

bazel_dep(name = "opal_cpp", version = "0.0.0")
local_path_override(module_name = "opal_cpp", path = "../..")

load("@opal_cpp//bazel:defs.bzl", "smithy_cpp_server_library")
deps = ["@opal_cpp//runtime:http", "@opal_cpp//runtime:server"]

Everything that names the module follows it:

  • Labels: @smithy_cpp//…@opal_cpp//… in the consumer module, docs, renovate.json, and the codegen plugin's default runtimeTarget (@opal_cpp//runtime:core, with the Java tests that assert it).
  • SMITHY_COPTSOPAL_COPTS: the constant hand-written BUILD files load from //bazel:copts.bzl. The generated BUILD files never loaded it, so the goldens are unchanged (regenerated to confirm: byte-identical).
  • The consumer module's own name: smithy_cpp_consumeropal_cpp_consumer, and boringssl-resolution-check.sh now queries bazel mod deps opal_cpp.
  • Prose in CI comments, bazel/defs.bzl, .bazelrc, docs and the plan.

Unchanged, by design: the smithy_cpp_{types,client,server}_library rules (they take a Smithy model as input and are named for it), smithy_cpp_codegen_maven (the codegen plugin's Maven repo; the plugin is a Smithy tool), and every smithy-cpp repository URL. GitHub redirects the old URL once the repo is renamed, and the git_override snippet in the quickstart follows whenever that lands.

buildifier re-sorted the consumer's dep lists because @opal_cpp sorts differently from @smithy_cpp; that is the only non-substitution churn.

Testing

  • bazel test //... --config=werror: 129 tests pass.
  • examples/bazel-consumer: 15 tests pass against the renamed module, including the boringssl resolution check that does bazel mod deps opal_cpp. The consumer's diff is the migration recipe: bazel_dep, override, labels, nothing else.
  • cd codegen && gradle build spotlessCheck passes; goldens regenerate byte-identically.
  • buildifier clean.

No new tests: no new behavior. The consumer module is the acceptance test for the rename, and its resolution-check script exercises the module name at the bazel mod level.

Checklist

  • Tests added/updated for the change (no new behavior; the consumer module exercises the renamed module end to end)
  • bazel test //... and (cd codegen && gradle build spotlessCheck) pass locally
  • Formatting clean (clang-format, buildifier, spotless)
  • Architectural decisions recorded as an ADR (ADR-0024, landed with Rename the runtime namespace from smithy to opal (#201, surface 1 of 3) #207)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jj5X2fKdgrYurHmbwLzUiQ


Generated by Claude Code

Surface 3 of 3; closes the issue. The module is opal_cpp, runtime labels
are @opal_cpp//runtime:..., the codegen plugin's default runtimeTarget
follows, and the copts constant is OPAL_COPTS. The out-of-tree consumer
module carries the migration: bazel_dep and local_path_override renamed,
labels substituted, nothing else. The smithy_cpp_*_library rules keep
their names: they take a Smithy model as input.

Closes #201
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review: Approve

Surface 3 of ADR-0024 looks complete and correctly scoped. Checked the diff against the ADR keep/change table and grepped the branch for leftover @smithy_cpp / SMITHY_COPTS / bazel_dep(name = "smithy_cpp") — nothing actionable remains outside CHANGELOG/ADR historical wording and the intentional smithy_cpp_codegen_maven repo.

Completeness

  • Module rename: MODULE.bazelopal_cpp; consumer → opal_cpp_consumer with matching local_path_override and boringssl-resolution-check.sh (bazel mod deps opal_cpp).
  • Labels: consumer + in-tree docs/examples use @opal_cpp//; macros still wire runtime via Label("//runtime:…")` (correct under the module).
  • SMITHY_COPTSOPAL_COPTS everywhere it is loaded (including runtime/BUILD.bazel's alias).
  • Codegen default runtimeTarget and the Java tests that assert it.
  • renovate.json (disable opal_cpp), CI comments, quickstart.

Intentional non-changes (verified)

  • smithy_cpp_{types,client,server}_library and private helpers
  • smithy_cpp_codegen_maven
  • https://github.com/muchq/smithy-cpp.git / repo prose
  • Fixture model namespaces (smithy.cpp.ruletest) and smithy_cpp_unknown_member

Notes (non-blocking)

  • Suggestion: CHANGELOG migration could explicitly call out runtimeTarget in smithy-build.json for consumers who set it (the “every @smithy_cpp// label” line covers it, but it is easy to miss).
  • Nit: Consumer BUILD.bazel churn is rename + load() re-sort; deps lists are the same multisets after substitution — no hidden behavior change.
  • CI: consumer + lockfiles + codegen already green on this head; remaining bazel/coverage legs were still running at review time.

LGTM for merge once remaining CI legs finish.

A consumer that sets runtimeTarget in smithy-build.json has a
@smithy_cpp// label outside any BUILD file; say so rather than leaving it
to "every label".
@aaylward
aaylward merged commit 3679697 into main Sep 9, 2026
16 checks passed
@aaylward
aaylward deleted the claude/kind-fermi-elfabg-201-3 branch September 9, 2026 12:42
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.

Stop naming runtime surfaces after the IDL: audit smithy in generated code and runtime deps

2 participants