Files
zeekayandHanzo Dev c3da83b4b0 commit the fixture's generated surface, and gate on it
A reader can now see exactly what this produces without running it, and
CI regenerates example/ and refuses a diff — so a change to an emitter
shows up as a change to the code it emits, in the same review. The
generated Go SDK is a package of this module, so the ordinary build
compiles it.

CI runs on lux-build with all three toolchains installed, so the compile
checks have nothing left to skip.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-01 11:36:38 -07:00

34 lines
827 B
Go

// Command fixture writes the fixture service's client surface.
//
// What it produces is committed under example/, for two reasons. A reader can
// see exactly what this generates without running anything, and CI regenerates
// it and refuses a diff — so a change to an emitter shows up as a change to the
// code it emits, in the same review.
package main
import (
"flag"
"fmt"
"os"
"github.com/luxfi/opgen"
"github.com/luxfi/opgen/internal/fixture"
)
func main() {
out := flag.String("out", "example", "the directory to write into")
flag.Parse()
r, err := opgen.Emit(fixture.App(), opgen.Options{Dir: *out})
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
for _, f := range r.Files {
fmt.Println(f)
}
for _, g := range r.Gaps {
fmt.Printf("gap %s: %s (%s)\n", g.Where, g.Op, g.Why)
}
}