Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix go install by committing generated browser definitions#23

Open
kimjune01 wants to merge 1 commit into
blob42:masterfrom
kimjune01:fix-build-gen-files
Open

Fix go install by committing generated browser definitions#23
kimjune01 wants to merge 1 commit into
blob42:masterfrom
kimjune01:fix-build-gen-files

Conversation

@kimjune01
Copy link
Copy Markdown

Summary

  • go install github.com/blob42/gosuki@latest fails because generated browser definition files (defined_browsers_*.go) are in .gitignore since commit 20d9f95. Users who install via go install cannot run go generate first, so the build breaks with undefined browsers.Defined.
  • Removed the **/defined_*.go pattern from .gitignore and committed the generated files for all 5 platforms (darwin, linux, windows, netbsd, openbsd).
  • Added gen_test.go that verifies generated files match the YAML source, so they stay in sync.

Test plan

  • go build ./... succeeds from a clean clone without running go generate
  • go vet ./... passes
  • go test ./pkg/browsers/... passes, including the new generated files test

The generated browser definition files were gitignored, causing
`go install github.com/blob42/gosuki/cmd/gosuki@latest` to fail
with "undefined: browsers.Defined" errors.

This commit:
- Removes **/defined_*.go from .gitignore
- Commits generated browser definition files for all platforms
- Adds test to verify generated files exist

Generated files needed for builds should be committed per Go best
practices. The Makefile already handles regeneration when
browsers.yaml changes, so contributors can still update definitions
easily.

Fixes the build failure when installing from source without running
`go generate` first.
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