-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Proposal] Use Golang 1.18 for Gitea 1.17 release #19917
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
Comments
Not sure I think that we should immediately jump on to Generics before releasing 1.17 but I agree with making Gitea 1.17 use Golang 1.18. One thing against moving to generics already is that a lot of the std library remains ungenercised and certainly most of our downstream libraries. This situation will improve over time and whilst I know someone has to start, the wrong steps now could lead to annoying refactors later. Further: https://planetscale.com/blog/generics-can-make-your-go-code-slower Whilst Gitea code is frankly far from optimised enough to make most of these performance losses a serious problem, this comment is worth noticing as it would be relevant to a lot of string manipulations:
Although genericising the WriteByte/WriteString to WriteByteSeq() would likely be beneficial. The Summary here is enlightening:
I do think that the go runtime and compiler will likely have further improvements in 1.19 etc with regards to how it handles generics internally. As would the std library and many of our upstream libraries. Do you have a serious place where generics would be appropriate? I think instead we should be looking at what's blocking release of 1.17-RC1 - and if there's nothing that we think is really missing or we need in 1.17 we should just cut it and then we can get started on 1.18, allow generics and do more major refactorings. If we make Gitea 1.17 only support go 1.18 then if there are generics changes that need to be backported we can do so - but I think adding generics at this point is too late. It's just going to further delay 1.17 - which we need to get ready for release. |
Nope at the moment. Two things here:
For question 1, I think it's reasonable because Golang's release cycle is very fast, a few month later, Golang 1.19 comes and Golang 1.17 will be unsupported. So, making Gitea use an active Golang 1.18 should be good. For question 2, I think we can wait and see, some code could benefit from it, for example, |
Use Golang 1.18 (as minimal requirement) for Gitea 1.17 release, make sure the Golang version is still actively supported during Gitea 1.17 lifecycle.
And Gitea can start using Golang generics from then on.
The text was updated successfully, but these errors were encountered: