-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix go version #34299
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
fix go version #34299
Conversation
@mengzhuo Since the riscv64 patch was contributed by you, maybe you can review this change. I haven't encounter the problem when building in other platform. |
FYI: |
go.mod
Outdated
@@ -2,6 +2,8 @@ module code.gitea.io/gitea | |||
|
|||
go 1.24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go 1.24.0
go.mod
Outdated
@@ -2,6 +2,8 @@ module code.gitea.io/gitea | |||
|
|||
go 1.24 | |||
|
|||
toolchain go1.24.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop these 2 lines.
57a1b77
to
02c64bc
Compare
go cmd will download and cache a copy of the Go toolchain, but go1.24 is not a valid version since golang/go#57631
How the toolchain dependency is managed? For example: if go 1.24.1 has security fixes, then will |
The mod treat |
Why should we specify minimum version If anything, I would specify |
ci check failed because of security issues in 1.24.{0,1} |
It shouldn't fail with |
Ah, it appears https://github.com/actions/setup-go#getting-go-version-from-the-gomod-file
This is very undesired behaviour, but I think it's unlikely they'd want to change it. I guess the best course of action is either not specifying a patch version in go.mod or specify a patch version in |
This method seems to only support setup-go, if I want to run it locally I still need to fix the go version to 1.24.2. |
Thanks for your first PR to the project! I think since we will have to bump go.mod regardless, and since actions/setup-go doesn't immediately bump its known latest version we sometimes have to wait on it when go patches are released, so we can skip |
go cmd will download and cache a copy of the Go toolchain, go1.24 is not a valid version since golang/go#57631.
I am using a fresh installed riscv machine, trying to compile gitea locally. When I try to run the go command, it prompts that the toolchain of version 1.24 not avaliable. After updating go.mod, the download was successful.