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

Use go1.20.14 for DefaultVersion #540

Merged
merged 11 commits into from
Feb 16, 2024

Conversation

ashmckenzie
Copy link
Contributor

I noticed when trying to deploy a Go app via dokku using Go version devel-a10e42f (which is is https://github.com/golang/go/releases/tag/go1.22.0) I received the following error using the most recent https://github.com/heroku/heroku-buildpack-go/ (0210495):

Before

$ make deploy
--snip--
-----> New Go Version, clearing old cache
-----> Installing bootstrap go1.12.17
-----> Fetching go1.12.17.linux-amd64.tar.gz... done
-----> Downloading development Go version devel-a10e42f... done
-----> Compiling development Go version devel-a10e42f
       Building Go cmd/dist using /cache/go1.12.17/go. (go1.12.17 linux/amd64)
       can't load package: package ./cmd/dist: found packages main (build.go) and building_Go_requires_Go_1_20_6_or_later (notgo120.go) in /cache/devel-a10e42f/go/src/cmd/dist

After

$ dokku buildpacks:set https://github.com/ashmckenzie/heroku-buildpack-go#82e57c6

$ make deploy
--snip--
-----> New Go Version, clearing old cache
-----> Installing bootstrap go1.20.13
-----> Fetching go1.20.13.linux-amd64.tar.gz... done
-----> Downloading development Go version devel-a10e42f... done
-----> Compiling development Go version devel-a10e42f
       Building Go cmd/dist using /cache/go1.20.13/go. (go1.20.13 linux/amd64)
       Building Go toolchain1 using /cache/go1.20.13/go.
       Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
       Building Go toolchain2 using go_bootstrap and Go toolchain1.
       Building Go toolchain3 using go_bootstrap and Go toolchain2.
       Building packages and commands for linux/amd64.
---
       Installed Go for linux/amd64 in /cache/devel-a10e42f/go
       Installed commands in /cache/devel-a10e42f/go/bin
       *** You need to add /cache/devel-a10e42f/go/bin to your PATH.
       go version devel +a10e42f Wed Feb 08:14:33 2024 +0000 linux/amd64

Increasing DefaultVersion to go1.20.13 as recommended then allows custom Go versions to be built.

@ashmckenzie ashmckenzie requested a review from a team as a code owner February 7, 2024 08:26
@edmorley edmorley requested review from joshwlewis and removed request for a team February 7, 2024 08:50
@joshwlewis
Copy link
Member

Yeah, it makes sense to update this. We really should be defaulting to a version that is actually supported by the go team. I just added go1.20.14 in #544. Mind updating to that? This will also need a CHANGELOG.md entry.

@ashmckenzie
Copy link
Contributor Author

ashmckenzie commented Feb 9, 2024

It's a shame my commit wasn't cherry picked into #544 and then updated to 1.20.14 but I guess as long as the bug is fixed.

Closing now that #544 is merged.

Apologies for the misunderstanding, re-opening.

@ashmckenzie ashmckenzie closed this Feb 9, 2024
@ashmckenzie ashmckenzie reopened this Feb 9, 2024
@ashmckenzie ashmckenzie force-pushed the ashmckenzie/fix-custom-go-building branch from 82e57c6 to 86bc7a8 Compare February 9, 2024 05:40
@ashmckenzie ashmckenzie changed the title Use go1.20.13 for DefaultVersion Use go1.20.14 for DefaultVersion Feb 9, 2024
@joshwlewis
Copy link
Member

@ashmckenzie thanks for the update / rebase. This is looking like a breaking change (for folks still using old go versions and/or old module management systems), so I'm proceeding cautiously. I've fixed a few broken tests, I'll continue to address the rest.

I haven't decided if this can be merged just yet. There might need to be some deprecation messaging first.

@ashmckenzie
Copy link
Contributor Author

Thanks for the update @joshwlewis 🙇 Is it too late to move to semantic versioning for the tags and make this a major change? (I know the answer 🙂)

@joshwlewis
Copy link
Member

@ashmckenzie thanks again. I am going to bring this in to main, but wait to ship it until next week.

@joshwlewis joshwlewis enabled auto-merge (squash) February 16, 2024 16:31
@joshwlewis joshwlewis merged commit dfecaac into heroku:main Feb 16, 2024
4 checks passed
@heroku-linguist heroku-linguist bot mentioned this pull request Feb 28, 2024
@edmorley edmorley mentioned this pull request May 8, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants