Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove go run from all go generate commands #1050

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 21, 2024

  1. Remove go run from all go generate commands

    Including `go run` in the //go:generate pragmas is never really how `go
    generate` was intended to be used. While it's a seemingly-useful hack to
    pin versions of tools, it breaks cross-compilation.
    
    Cross-compilation breaks because if the requested GOARCH differs from
    the one `go generate` is being run on, `go run` receives the same GOARCH
    and builds the tool for that platform instead. The tool will never exec
    correctly because of the platform mismatch.
    
    This removes `go run` from all `//go:generate` pragmas and adds the
    appropriate installation of these tools to the Dockerfile. Developers
    are expected to have these tools installed in the same way in their
    development environment (in the same way as go, clang, etc.).
    timraymond committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    436581a View commit details
    Browse the repository at this point in the history