Skip to content

chore: clean up the go_component example (15 targets → 8)#469

Open
avrabe wants to merge 1 commit into
mainfrom
chore/cleanup-go-example
Open

chore: clean up the go_component example (15 targets → 8)#469
avrabe wants to merge 1 commit into
mainfrom
chore/cleanup-go-example

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 21, 2026

Summary

examples/go_component had accumulated into a junk drawer — 10
go_wasm_component targets
(most of them one-off experiments and debug
variants from earlier TinyGo bring-up) and 7 .go files that no BUILD
target referenced at all
.

Removed

  • 7 dead .go filesbindings.go, calculator_main.go,
    calculator_reactor.go, handlers.go, main.go, service.go,
    simple_main.go (referenced by nothing)
  • 6 experiment/duplicate targetscalculator_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 + wit/simple-calculator.wit

Kept (definitions unchanged)

The 4 component targets that //test/go and docs-site actually depend on —
calculator_component, calculator_component_debug,
http_service_component, simple_test — plus their WIT libraries and
wit_markdown doc targets. 15 targets → 8.

Validation

bazel query //examples/go_component/... + //test/go/... and analysis
(bazel build --nobuild) both pass. Every //test/go target_under_test
and the docs-site calculator_docs reference still resolves — no dangling
references.

🤖 Generated with Claude Code

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>
@temper-pulseengine
Copy link
Copy Markdown

Automated review for PR #469

pulseengine/rules_wasm_component:chore/cleanup-go-example → pulseengine/rules_wasm_component:main

Verdict: 💬 Comment

Summary: The pull request is approved as it removes several outdated and unused Go components from the examples/go_component directory, which are no longer needed or maintained in the project.

Findings: 0 mechanical (rivet) · 4 from local AI model.

Findings (4):

  1. examples/go_component/bindings.go:1

    // WIT-generated bindings for HTTP service component
    

    The file is empty and can be removed as it serves no purpose.

  2. examples/go_component/calculator_reactor.go:1

    // Pure export functions for WIT component interface
    

    The file contains only placeholder code that does not contribute to the functionality of the project.

  3. examples/go_component/main.go:1

    // Initialize the calculator component and export required functions
    

    The file is empty and can be removed as it serves no purpose.

  4. examples/go_component/wit/simple-calculator.wit:1

    package example:calculator@1.0.0;
    

    The file contains only placeholder code that does not contribute to the functionality of the project.


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 7b6a981

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.

1 participant