Repository navigation
fix(ci): run the generator with go generate . so removed APIs don't crash it - #14
Merged
Merged
Conversation
… 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 <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The daily
regenworkflow has failed every day since 2026-10-10:go generate ./...reads every package's file list up front. The//go:generatedirective inmain.goruns first, and it deletes thecmd/gen_*.gofiles for APIs that left the catalog. Whengo generatethen reaches thecmdpackage, it tries to open a file that no longer exists. This is the first time an API was removed (amazon-reviews, which was retired on purpose), so the bug never showed up before. CI'sverify-generatedjob runs the same command and fails the same way.Fix
main.goholds the only directive, sogo generate .runs the same generator without scanningcmd/. I changed it inregen.yml,ci.ymland the README.Tested
Run locally against the live catalog:
go generate .exits 0 and writes 67 commands. It removesamazon-reviewsand adds chat-gpt-chat, facebook-profile, google-finance, google-flights-deals, google-scholar, google-scholar-cite, instagram-comments, tripadvisor-place/reviews/search and walmart-product/reviews/search.go vet ./...andgo buildpass, and--helpsucceeds for every generated command.Heads-up
On this PR,
verify-generatedwill report "Generated files are out of date". That's real drift: main hasn't had a spec refresh since July, and #13 is stale. It goes green once a fresh refresh lands. After this merges, the nextregenrun (or a manualworkflow_dispatch) opens one.🤖 Generated with Claude Code