Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename go module to allow command line installs #327

Merged
merged 3 commits into from
Feb 8, 2022

Conversation

dglsparsons
Copy link
Contributor

The go install command doesn't like it when the go.mod file
declares a different path to the module, to the actual path.

e.g.

$ go install github.com/vercel/turborepo/cli/cmd/turbo@latest
go install: github.com/vercel/turborepo/cli/cmd/turbo@latest: github.com/vercel/turborepo/[email protected]: parsing go.mod:
	module declares its path as: turbo
	        but was required as: github.com/vercel/turborepo/cli

This PR renames the go module to match the path name, as go expects. This allows the turborepo CLI to be installed via go install

@vercel
Copy link

vercel bot commented Dec 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/2GRstQRH3MyhQE86TzwPzkCeodJZ
✅ Preview: https://turbo-site-git-fork-dglsparsons-main.vercel.sh

@jaredpalmer
Copy link
Contributor

I think this complicates #397 quite a bit?

@jaredpalmer
Copy link
Contributor

we should do it for the go doc though I guess

@dglsparsons
Copy link
Contributor Author

I think you could probably work out if the binary is in $GOBIN and prompt for go install for the latest version in that instance?

@jaredpalmer
Copy link
Contributor

We should do this, but probs easier to just take main and search + replace at this point.

@dglsparsons
Copy link
Contributor Author

dglsparsons commented Feb 5, 2022

Yeah. Almost certainly is. I'll get it rebased on Monday for you.

Update: rebased this now.

The `go install` command doesn't like it when the go.mod file
declares a different path to the module, to the actual path.

e.g.

```
$ go install github.com/vercel/turborepo/cli/cmd/turbo@latest
go install: github.com/vercel/turborepo/cli/cmd/turbo@latest: github.com/vercel/turborepo/[email protected]: parsing go.mod:
	module declares its path as: turbo
	        but was required as: github.com/vercel/turborepo/cli
```

This PR renames the go module to match the path name, as go expects. This allows the turborepo CLI to be installed via `go install`
@jaredpalmer jaredpalmer added the pr: automerge Kodiak will merge these automatically after checks pass label Feb 8, 2022
@kodiakhq kodiakhq bot merged commit 0c24f5a into vercel:main Feb 8, 2022
sokra added a commit that referenced this pull request Oct 25, 2022
so we don't really have to benchmark that
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants