planetscale / cli

The CLI for PlanetScale Database
https://planetscale.com/cli
Apache License 2.0
604 stars 51 forks source link

Make cmd/pscale `go install`-able #809

Open marwan-at-work opened 10 months ago

marwan-at-work commented 10 months ago

It would be great if some of us Go users can install/update the pscale library by just doing go install github.com/planetscale/cli/cmd/pscale@latest

However, due to the 1 replace directive, go install refuses to install binaries that have a replace directive in them:

$ go install github.com/planetscale/cli/cmd/pscale@latest
go: downloading github.com/planetscale/cli v0.177.0
go: github.com/planetscale/cli/cmd/pscale@latest (in github.com/planetscale/cli@v0.177.0):
    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.

Looking at the go.mod file, there's only one replace clause, which seems like a hopefully small lift (by either changing the import path of the fork), or resolving whatever is being replaced upstream would unable this helpful feature.

Thanks!

dbussink commented 10 months ago

Sadly cleaning up that replace is a very big lift so not something that’s happening any time soon, if ever to be honest.