Phase 0: project foundations - #3
Merged
Merged
Conversation
- Bazel 9 workspace (bzlmod): MODULE.bazel + lockfile, .bazelrc with C++20 baseline and asan/ubsan configs, hello-world runtime target (//runtime:core) with a GoogleTest test. - Codegen Gradle skeleton: smithy-cpp-codegen module reserving the cpp-codegen smithy-build plugin name, with ServiceLoader registration, unit tests, and Spotless (google-java-format). - CI: Bazel matrix (Linux gcc/clang, macOS, Windows MSVC), sanitizer job, Gradle job, lint job (clang-format, clang-tidy, buildifier). - ADRs 0001-0004: JVM DirectedCodegen generator, restJson1 + rpcv2Cbor from the start, Outcome-based error handling, Bazel 9 only. - Fixture models: examples/weather (restJson1 REST) and examples/cafe (rpcv2Cbor RPC with enums/unions/errors). - Repo hygiene: Apache-2.0 LICENSE, CONTRIBUTING, development guide, clang-format/clang-tidy/editorconfig, issue and PR templates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WjaNFwBZxoHdqagvq8ycQf
The sanitizer job links through Bazel's C driver, which leaves out the UBSan C++ runtime pieces (__ubsan_vptr_type_cache) that vptr checks need; -fsanitize-link-c++-runtime pulls them in. The lint job's global npm install needed root on hosted runners, so use npx instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WjaNFwBZxoHdqagvq8ycQf
4 tasks
4 tasks
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.
What
Implements Phase 0 of
docs/PLAN.md: the foundations every later phase builds on.MODULE.bazel(+ committed lockfile) withrules_ccandgoogletest;.bazelrcsets the C++20 baseline per platform,asan/ubsanconfigs, and the Bazel 9--incompatible_autoload_externallyshim for third-party BUILD files that predate the native C++ rule removal (our own BUILD filesload()from@rules_ccexplicitly)..bazelversiontracks9.x.//runtime:core(smithy::Version()) with a GoogleTest test, establishing theruntime/include/smithy/<module>header layout from PLAN §3.1.codegen/):smithy-cpp-codegenmodule againstsmithy-codegen-core/smithy-build1.53.0, reserving thecpp-codegenplugin name with ServiceLoader registration, unit tests (JUnit 5), and Spotless/google-java-format.build spotlessCheck), and a lint job (clang-format, clang-tidy, buildifier).Outcome-based error handling with the C++20 compiler floor; Bazel 9 as the only supported build system.examples/weather(restJson1: resources, HTTP bindings, pagination, modeled 404) andexamples/cafe(rpcv2Cbor: enums, unions, idempotency token, client/server errors) — the models that drive tests in Phases 2–5.CONTRIBUTING.md,docs/development.md,.clang-format/.clang-tidy/.editorconfig/.gitignore, issue + PR templates, README status table.Testing
Validated locally with the same commands CI runs:
bazel test //... --config=ci— passes (Bazel 9.1.1, Linux)bazel test //... --config=ci --config=asan --config=ubsan— passes(cd codegen && gradle build spotlessCheck)— passes (JDK 21 targeting release 17, Gradle 8.14.3)clang-format --dry-run --Werror,clang-tidy, andbuildifier --mode=check -r .— cleanThe macOS/Windows legs of the matrix run for the first time in this PR's CI.
Checklist
bazel test //...and(cd codegen && gradle build spotlessCheck)pass locally🤖 Generated with Claude Code
https://claude.ai/code/session_01WjaNFwBZxoHdqagvq8ycQf
Generated by Claude Code