planetscale / planetscale/cli

Make cmd/pscale `go install`-able

Open
#809 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
670
Forks
63
Avg merge
11h 37m
Merged PRs (30d)
64

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cmd/pscale and the single replace directive in go.mod, then run go install github.com/planetscale/cli/cmd/pscale@latest to reproduce the reported failure. Trace the replaced dependency and verify that the command installs successfully without a replace directive affecting module installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.