ward-kdl: generate main.go via specverb-gen (no committed Go) #64

Closed
opened 2026-06-07 02:57:46 +00:00 by coilysiren · 0 comments
Owner

Summary

Follow-up to #63: ward-kdl should declare only its Guardfile - no hand-written main.go. Wire cli-guard's specverb-gen (cli-guard#89) so the consumer main.go is generated from forgejo.guardfile.kdl and gitignored.

Scope

  • Drop the committed cmd/ward-kdl/main.go and main_test.go; the dir tracks only forgejo.guardfile.kdl.
  • make ward-kdl runs specverb-gen --guardfile ... --out cmd/ward-kdl/main.go, then go build -o bin/ward-kdl.
  • Gitignore cmd/ward-kdl/main.go (generated, // Code generated ... DO NOT EDIT.).
  • A fresh checkout still go build ./.../go test ./... clean: the spec-less dir is simply not a package until generated.

The engine + generator are unit-tested in cli-guard; ward-kdl carries no Go to test.

## Summary Follow-up to #63: ward-kdl should declare only its Guardfile - no hand-written `main.go`. Wire cli-guard's `specverb-gen` (cli-guard#89) so the consumer `main.go` is generated from `forgejo.guardfile.kdl` and gitignored. ## Scope - Drop the committed `cmd/ward-kdl/main.go` and `main_test.go`; the dir tracks only `forgejo.guardfile.kdl`. - `make ward-kdl` runs `specverb-gen --guardfile ... --out cmd/ward-kdl/main.go`, then `go build -o bin/ward-kdl`. - Gitignore `cmd/ward-kdl/main.go` (generated, `// Code generated ... DO NOT EDIT.`). - A fresh checkout still `go build ./...`/`go test ./...` clean: the spec-less dir is simply not a package until generated. The engine + generator are unit-tested in cli-guard; ward-kdl carries no Go to test.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#64
No description provided.