go install fails with 0.21.5
Author: jonmzCreated Sep 14, 2026Updated Sep 14, 2026
While installing 0.21.4 worked fine:
[builduser@stardust ~]$ go install github.com/xo/[email protected]
go: downloading github.com/xo/usql v0.21.4
go: downloading github.com/go-git/go-billy/v5 v5.8.0
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/spf13/cobra v1.10.2
go: downloading github.com/spf13/pflag v1.0.10
[...]... installing 0.21.5 fails:
[builduser@stardust ~]$ go install github.com/xo/[email protected]
go: github.com/xo/[email protected] (in github.com/xo/[email protected]):
The go.mod file for the module providing named packages contains one or
more exclude directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.This also affects usql@latest which is officially documented but fails, too
[builduser@stardust ~]$ go install github.com/xo/usql@latest
go: github.com/xo/usql@latest (in github.com/xo/[email protected]):
The go.mod file for the module providing named packages contains one or
more exclude directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.Looks like the same issue as with https://github.com/xo/usql/issues/394 which is from 2023 and was fixed. Seems like this time https://github.com/xo/usql/commit/dd10b0bfcace3b22bf875f819ce44062d3d3f7a5#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R378 is the offending line in go.mod.
Source: xo/usql