xo / usql

Universal command-line interface for SQL databases
MIT License
8.82k stars 346 forks source link

usql cannot be installed with go install #394

Closed camh- closed 1 year ago

camh- commented 1 year ago

The README says you can install from source using

go install github.com/xo/usql@latest

However that does not work since there is a replace directive in the go.mod file:

$ go install github.com/xo/usql@latest
go: downloading github.com/xo/usql v0.13.8
go: github.com/xo/usql@latest (in github.com/xo/usql@v0.13.8):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

Is it possible to get rid of the replace directive so we can install from source again?

Commit 77e689275fe65fc31e069802f6178008ba32c4c2 added the replace directive, but unfortunately the commit message does not give a reason for it, so it's not clear what needs to be done for it to be removed.