chore: clean up the go_component example (15 targets → 8)#469
Conversation
examples/go_component had become a junk drawer — 10 go_wasm_component targets, most of them one-off experiments and debug variants left over from earlier TinyGo bring-up, plus 7 .go files that no BUILD target referenced at all. Removed: - 7 unreferenced .go files (bindings.go, calculator_main.go, calculator_reactor.go, handlers.go, main.go, service.go, simple_main.go) - 6 experiment/duplicate targets (calculator_with_bindings, calculator_simple_binding, calculator_manual, multi_file_test, calculator_reactor, simple_wasi) plus the 4 .go files they alone used - the now-unused simple_calculator_wit and wit/simple-calculator.wit Kept the targets that test/go and docs-site depend on — calculator_component, calculator_component_debug, http_service_component, simple_test, the WIT libraries, and the doc targets — with their definitions unchanged. The example now has 8 targets instead of 15. Validated: `bazel query` and analysis (`build --nobuild`) both pass; every //test/go and docs-site reference still resolves. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Automated review for PR #469pulseengine/rules_wasm_component: Verdict: 💬 Comment Summary: The pull request is approved as it removes several outdated and unused Go components from the Findings: 0 mechanical (rivet) · 4 from local AI model. Findings (4):
Generated by a local AI model and post-validated against a strict JSON contract. Each finding includes the verbatim line being criticised — verify by reading the file at the cited location. Reviewed at |
Summary
examples/go_componenthad accumulated into a junk drawer — 10go_wasm_componenttargets (most of them one-off experiments and debugvariants from earlier TinyGo bring-up) and 7
.gofiles that no BUILDtarget referenced at all.
Removed
.gofiles —bindings.go,calculator_main.go,calculator_reactor.go,handlers.go,main.go,service.go,simple_main.go(referenced by nothing)calculator_with_bindings,calculator_simple_binding,calculator_manual,multi_file_test,calculator_reactor,simple_wasi— plus the 4.gofiles they alone usedsimple_calculator_wit+wit/simple-calculator.witKept (definitions unchanged)
The 4 component targets that
//test/goanddocs-siteactually depend on —calculator_component,calculator_component_debug,http_service_component,simple_test— plus their WIT libraries andwit_markdowndoc targets. 15 targets → 8.Validation
bazel query //examples/go_component/... + //test/go/...and analysis(
bazel build --nobuild) both pass. Every//test/gotarget_under_testand the
docs-sitecalculator_docsreference still resolves — no danglingreferences.
🤖 Generated with Claude Code