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

proposal: x/tools/cmd/getgo: document and possibly ship in distributions #27700

Closed
jezek opened this issue Sep 16, 2018 · 10 comments
Closed

proposal: x/tools/cmd/getgo: document and possibly ship in distributions #27700

jezek opened this issue Sep 16, 2018 · 10 comments

Comments

@jezek
Copy link

jezek commented Sep 16, 2018

Feature request:

Provide a go tool to update go to latest stable version, or to a user selected version.

Examples:

Update go to latest stable version.

go version -update

Replace current version with version 1.x.y

go version -update -v 1.x.y
@ALTree ALTree changed the title FeatureRequest: go tool version update cmd/go: add -update flag to go tool version Sep 16, 2018
@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Sep 16, 2018
@ALTree
Copy link
Member

ALTree commented Sep 16, 2018

The version tool currently has a very narrow scope: it just shows the version of the toolchain it's invoked from. I think it's unlikely it'll be expanded to become an installer.

OTOH, we already have a tool called getgo (https://github.com/golang/tools/tree/master/cmd/getgo) that can be used to install go toolchains. Note that (from its docs):

If Go is already installed via this installer it will upgrade it to the latest version of Go.

which is similar to what you're asking.

@jezek
Copy link
Author

jezek commented Sep 17, 2018

Thank you for the getgo command, I should have searched harder.

But IMHO this command should be installed by default like gofmt or godoc. Or am I wrong?

@bcmills bcmills added this to the Unplanned milestone Sep 17, 2018
@rsc rsc changed the title cmd/go: add -update flag to go tool version proposal: document getgo and possibly ship in distributions Sep 19, 2018
@rsc
Copy link
Contributor

rsc commented Sep 19, 2018

go version -update is definitely too difficult. (The go command should not be attempting to overwrite itself.) Changing to a proposal to document and ship getgo.

@rsc
Copy link
Contributor

rsc commented Sep 19, 2018

/cc @andybons for triage. If no one is available now maybe put on hold.

@agnivade
Copy link
Contributor

Shipping getgo is a great idea. From what I see in HN, the community will definitely benefit from this. But there are some pending issues which need attention - #21277, #21533.

Also, note that if one already has a go distribution, it is possible to do go get golang.org/dl/<> to install/update go. Although, it will install in $HOME/sdk and not in /usr/local/go. But ideally, we should promote and use only one tool for installing/updating go.

@andybons andybons self-assigned this Sep 20, 2018
@andybons
Copy link
Member

Putting on hold for now while we figure out next steps so that proposal committee doesn’t need to see it each week.

@rsc rsc changed the title proposal: document getgo and possibly ship in distributions proposal: x/tools/cmd/getgo: document and possibly ship in distributions Oct 10, 2018
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Aug 16, 2019
@andybons andybons removed their assignment Sep 18, 2019
@matthewhartstonge
Copy link

matthewhartstonge commented Jun 29, 2022

I'll chime in here with a suggestion for standardisation with other programming languages: go upgrade

Via #53596 for inline visibility:

A number of the programming languages I use support upgrade paths built into their tooling which has made keeping up to date extremely easy. This is definitely more of a ✨nice to have✨ for developer experience.

Benefits

  • Could make upgrades easier for newcomers.
  • Could make it easier for developers to stay up to date.
  • Could make polyglot device management easier for teams by the CLI being able to run the upgrade.
  • Could help stop human polling of go.dev, twitter or rss release feeds to know when a new version is out.

Prior Art

  • flutter upgrade
  • rustup upgrade
  • Most JavaScript frameworks provide some form of the above, i.e. ember update but this is little different as these are libraries/frameworks than a language.

Example

The following example pinched from the Flutter upgrade flow:

$ go upgrade
upgrading from go1.18.2 to go1.18.3...

Downloading Go SDK...
Expanding downloaded archive...

Upgrading Go...
Go 1.18.3 • channel stable • https://github.com/golang/go.git
revision 4068be5 (28 days ago) • 2022-06-02 04:38:00 +1200
$ go upgrade
go is already up to date on channel stable
go version go1.18.3 windows/amd64

@hyangah
Copy link
Contributor

hyangah commented Feb 16, 2024

fyi - getgo is deprecated. #60951
Should we close this proposal?

@dmitshur
Copy link
Contributor

I suspect it should go to Declined as Obsolete. Removed it from Hold so that this can happen.

@rsc
Copy link
Contributor

rsc commented Mar 1, 2024

This proposal is a duplicate of a previously discussed proposal, as noted above,
and there is no significant new information to justify reopening the discussion.
The issue has therefore been declined as a duplicate.
— rsc for the proposal review group

@rsc rsc closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Declined
Development

No branches or pull requests

10 participants