Fix go install by committing generated browser definitions#23
Open
kimjune01 wants to merge 1 commit into
Open
Conversation
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.
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.
Summary
go install github.com/blob42/gosuki@latestfails because generated browser definition files (defined_browsers_*.go) are in.gitignoresince commit 20d9f95. Users who install viago installcannot rungo generatefirst, so the build breaks with undefinedbrowsers.Defined.**/defined_*.gopattern from.gitignoreand committed the generated files for all 5 platforms (darwin, linux, windows, netbsd, openbsd).gen_test.gothat verifies generated files match the YAML source, so they stay in sync.Test plan
go build ./...succeeds from a clean clone without runninggo generatego vet ./...passesgo test ./pkg/browsers/...passes, including the new generated files test