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: cmd/dist: cli based upgrades #53596

Closed
matthewhartstonge opened this issue Jun 29, 2022 · 10 comments
Closed

proposal: cmd/dist: cli based upgrades #53596

matthewhartstonge opened this issue Jun 29, 2022 · 10 comments

Comments

@matthewhartstonge
Copy link

matthewhartstonge commented Jun 29, 2022

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
@gopherbot gopherbot added this to the Proposal milestone Jun 29, 2022
@jacobishao
Copy link
Contributor

how often do you update go sdk? I rarely do it. maybe one year, I guess.

@ericlagergren
Copy link
Contributor

There is already go install golang.org/dl/go1.2.3@latest.

@mvdan
Copy link
Member

mvdan commented Jun 29, 2022

You could certainly build this on top of https://pkg.go.dev/golang.org/dl, like @ericlagergren says. Note that there is also https://go.dev/dl/?mode=json to quickly get the information on what the latest stable version is.

I agree that a nice UX would be useful to some people, but I'm not convinced that this needs to be part of Go itself - go install golang.org/dl/go1.18.3@latest && go1.18.3 download && go1.18.3 version works without needing any special support in the Go toolchain, for example.

@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Jun 29, 2022
@earthboundkid
Copy link
Contributor

I worry that this would integrate poorly with package managers like Homebrew, apt, etc.

@Zerotask
Copy link

I really like the idea of having a simple upgrade command. Go stands for simplicity but there is no simple option to upgrade itself.

What is the reason against a go upgrade?

@seankhliao
Copy link
Member

Duplicate of #27700

@seankhliao seankhliao marked this as a duplicate of #27700 Jun 29, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2022
@matthewhartstonge
Copy link
Author

Cheers @seankhliao - tried a number of keywords but couldn't find an existing issue.

@rsc
Copy link
Contributor

rsc commented Jul 1, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@earthboundkid
Copy link
Contributor

I think this issue should be taken off the proposals list and #27700 added in its place.

@rsc rsc moved this from Active to Declined in Proposals (old) Jul 20, 2022
@rsc
Copy link
Contributor

rsc commented Jul 20, 2022

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

@golang golang locked and limited conversation to collaborators Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

9 participants