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

dl: No longer able to download a new Go toolchain from an old Go version #65599

Closed
punya opened this issue Feb 8, 2024 · 6 comments
Closed

Comments

@punya
Copy link

punya commented Feb 8, 2024

As a result of https://go-review.googlesource.com/c/dl/+/540221, (golang/dl@2a66dfb)

go get golang.org/dl/go1.19.13 run from any Go version <= 1.16 now fails with:

# golang.org/dl/internal/version
go/src/golang.org/dl/internal/version/signal_unix.go:14: signalsToIgnore redeclared in this block
	previous declaration at go/src/golang.org/dl/internal/version/signal_notunix.go:13
go/src/golang.org/dl/internal/version/version.go:151: undefined: os.WriteFile
go/src/golang.org/dl/internal/version/version.go:322: undefined: io.ReadAll

because //+build was removed and //go:build is not supported on those versions.

My CI pipeline run from an old Debian that tries to download a newer Go version now fails because of this change.

Originally posted by @delthas in #60268 (comment)

@punya punya changed the title Unable to download a new Go toolchain from an old Go version dl: No longer able to download a new Go toolchain from an old Go version Feb 8, 2024
@seankhliao
Copy link
Member

as noted in the original issue, those versions are outside of our support window (2 most recent major releases)

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2024
@punya
Copy link
Author

punya commented Feb 8, 2024

You're right that the original issue calls out the support window. However, I think it's worth making a distinction between the golang.org/dl package which is often used to install a desired version of Go, and the other packages which are used as libraries.

If this is working as intended, please consider adding a prominent note to https://go.dev/doc/manage-install documenting the minimum version.

@delthas
Copy link

delthas commented Feb 8, 2024

Agreed: while supporting only the 2 latest major versions for Go in general makes sense; for dl in particular this means that the only remaining use cases are:

  • upgrade from the N-1 latest major version to the latest major version (because N-2 is out of support by the time N comes out)
  • upgrade from a minor version to another minor version (probably not the main use case)

(In other words, go dl stops working after 1 year (2 releases) / no upgrade on a system for one year means you have to reinstall Go.)

Which is much more specific and reduced in scope than the previous behavior (effectively) where you could start from any old install and upgrade to latest.

Maybe it could be worth maintaining Go compatibility for dl/ specifically for more versions, so that even users on older machines can profit from dl. The tradeoff being to have to keep a somewhat larger compatability for dl/ (not that many files?)

@punya
Copy link
Author

punya commented Feb 9, 2024

Perhaps the team's intent is that dl is really for installing older versions of Go, not newer ones? It does seem worth clarifying.

@ianlancetaylor
Copy link
Contributor

CC @golang/release

@seankhliao
Copy link
Member

consider #44329 (comment) where the use of GOVERSION may obsolete the use golang.org/dl (assuming a new enough starting version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants