From 751b54dcc2c64a2b0c4e5f84be9f55922870abe9 Mon Sep 17 00:00:00 2001 From: Roman Milyushkevich Date: Tue, 20 Oct 2026 15:02:21 +0300 Subject: [PATCH] fix(ci): run the generator with `go generate .` so removed APIs don't crash it `go generate ./...` lists every package's files before running anything. The directive in main.go then deletes cmd/gen_*.go for APIs that left the catalog, and go generate fails opening a file that's gone when it reaches the cmd package. amazon-reviews leaving the catalog has failed the daily regen run since 2026-10-10, and verify-generated fails the same way. The only directive lives in main.go, so `go generate .` runs the same generator without scanning cmd/. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/regen.yml | 2 +- README.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00eb85d..f5f9677 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,9 +57,9 @@ jobs: cache: true - name: ensure generated files are up to date run: | - go generate ./... + go generate . if ! git diff --quiet; then - echo "Generated files are out of date. Run 'go generate ./...' and commit." + echo "Generated files are out of date. Run 'go generate .' and commit." git diff --stat exit 1 fi diff --git a/.github/workflows/regen.yml b/.github/workflows/regen.yml index 73c3607..770fcf4 100644 --- a/.github/workflows/regen.yml +++ b/.github/workflows/regen.yml @@ -22,7 +22,7 @@ jobs: cache: true - name: regenerate - run: go generate ./... + run: go generate . - name: check for diff id: diff diff --git a/README.md b/README.md index 0da2dab..c546110 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ Every command here is generated from the live schema at `https://api.hasdata.com Contributing locally: ```sh -go generate ./... # regenerate cmd/gen_*.go from api.hasdata.com +go generate . # regenerate cmd/gen_*.go from api.hasdata.com go build ./... go test ./... ```