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

Discussion: go 1.21+ toolchain version #529

Open
robdimsdale opened this issue Oct 11, 2023 · 0 comments
Open

Discussion: go 1.21+ toolchain version #529

robdimsdale opened this issue Oct 11, 2023 · 0 comments

Comments

@robdimsdale
Copy link
Member

Starting with go 1.21, there is an optional entry in go.mod for toolchain, and an associated environment variable GOTOOLCHAIN. This is part of a larger change in go 1.21 around toolchains and minimum go versions. See documentation and the blog post.

This issue is to capture thoughts around what we might want to do with this new information. If we identify actionable features we can link them here.

Based on my understanding, I don't think there's too much the buildpack can or should do with this information, as the go toolchain itself processes this information and acts accordingly.

One thing we could choose to do could be fail-fast during Detect if the requested go toolchain is greater than the available versions of go the buildpack provides. That could be contentious, however, as starting with go 1.21, the go toolchain will download the required version of golang automatically, and as a result Paketo Buildpacks could be viewed as unnecessarily restrictive. Of course, this automatic download wouldn't work in an offline environment, so the build will fail regardless of whether the failure is by the buildpack in Detect or by the toolchain in Build.

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

1 participant