You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Go 1.24's tool dependency tracking with go get -tool to install the golang-migrate/migrate CLI, executing via go tool github.com/golang-migrate/migrate/v4/cmd/migrate resulted in a connection error. The root cause was a build constraint mismatch due to missing build tag specifications during invocation.
The migrate CLI requires explicit build tags (e.g., postgres, mysql) to conditionally compile database drivers. This works correctly when using go install with tags:
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
But go tool [tool name] command lacks explicit support for build tags (-tags) when invoked directly.
Expectation
Extend the go tool command to accept a -tags flag, propagating build tags to the underlying compilation process.
For example:
go tool -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate
The text was updated successfully, but these errors were encountered:
Proposal Details
Background
When using Go 1.24's tool dependency tracking with
go get -tool
to install the golang-migrate/migrate CLI, executing viago tool github.com/golang-migrate/migrate/v4/cmd/migrate
resulted in a connection error. The root cause was a build constraint mismatch due to missing build tag specifications during invocation.The migrate CLI requires explicit build tags (e.g.,
postgres
,mysql
) to conditionally compile database drivers. This works correctly when using go install with tags:go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
But
go tool [tool name]
command lacks explicit support for build tags (-tags) when invoked directly.Expectation
Extend the
go tool
command to accept a-tags
flag, propagating build tags to the underlying compilation process.For example:
go tool -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate
The text was updated successfully, but these errors were encountered: