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 Go 1.21 and update dependencies #26878

Merged
merged 2 commits into from Sep 3, 2023
Merged

Conversation

wxiaoguang
Copy link
Contributor

To make sure Gitea's next release's lifecycle could have active Golang support.

And min/max are builtin now.

@wxiaoguang wxiaoguang added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Sep 2, 2023
@wxiaoguang wxiaoguang added this to the 1.21.0 milestone Sep 2, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 2, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 2, 2023
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 2, 2023
@wxiaoguang wxiaoguang changed the title Use Go 1.21 for next Gitea release Use Go 1.21 and update dependencies Sep 2, 2023
@harryzcy
Copy link
Contributor

harryzcy commented Sep 2, 2023

Does it mean Gitea 1.21 drops support for Go 1.20?

@delvh
Copy link
Member

delvh commented Sep 2, 2023

Yes, effectively.
That's also why I'm unsure yet if I should approve or not.

@techknowlogick
Copy link
Member

Let's hold off until Gitea 1.21 is out. We tend to keep the supported versions of golang supported by Gitea, and go1.20 is still supported.

@wxiaoguang
Copy link
Contributor Author

I do not think it needs to be "hold"

We have done so many times, and see the discussions:

I do not think there would be any problem.

@harryzcy
Copy link
Contributor

harryzcy commented Sep 3, 2023

It's about whether we want to let Gitea compile on Go 1.20 or not. Before Go 1.21, the version in go.mod doesn't mean much. But now it's the minimum version that can be compiled.

To improve forwards compatibility, Go 1.21 now reads the go line in a go.work or go.mod file as a strict minimum requirement: go 1.21.0 means that the workspace or module cannot be used with Go 1.20 or with Go 1.21rc1.

@wxiaoguang
Copy link
Contributor Author

It's about whether we want to let Gitea compile on Go 1.20 or not.

My answer is "not". The code also uses Golang 1.21 new features like min/max

@lunny
Copy link
Member

lunny commented Sep 3, 2023

As a reminder, Go1.21 is the first version which drop the support for windows7 and windows server 2012.

@harryzcy
Copy link
Contributor

harryzcy commented Sep 3, 2023

Windows 7 support ended already, and windows server 2012 won't be supported in Oct. I don't feel that's an issue.

Since gitea is not a library, I feel bumping go is fine, and it will make maintaining easier in the future. But we need to update README regarding "Go Stable"

make backend which requires Go Stable, the required version is defined in go.mod.

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Sep 3, 2023

Windows 7 support ended already, and windows server 2012 won't be supported in Oct. I don't feel that's an issue.

Agree, and a few months later, Golang 1.20 will reach EOL. So the ending of Windows 7 support doesn't make much difference.

make backend which requires Go Stable, the required version is defined in go.mod.

IMO it's clear enough, first, it needs Go Stable, while the required version is defined in go.mod, which is 1.21

Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have anything against it.
So, it's a cautious LGTM from my side.
I wonder how many times you'll need to discuss this exact scenario again, @wxiaoguang

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 3, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 3, 2023
@KN4CK3R KN4CK3R enabled auto-merge (squash) September 3, 2023 09:59
@KN4CK3R KN4CK3R merged commit fc03916 into go-gitea:main Sep 3, 2023
24 checks passed
@wxiaoguang wxiaoguang deleted the use-go-1.21 branch September 3, 2023 11:14
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 4, 2023
* giteaofficial/main:
  [skip ci] Updated licenses and gitignores
  Update documents to fix some links (go-gitea#26885)
  clarify aspects of the dump command (go-gitea#26887)
  Relocate the `RSS user feed` button (go-gitea#26882)
  Use Go 1.21 and update dependencies (go-gitea#26878)
  Update docs about attachment path (go-gitea#26883)
  Refactor "shortsha" (go-gitea#26877)
  Fix wrong review requested number (go-gitea#26784)
  Refactor `og:description` to limit the max length (go-gitea#26876)
  Reorder blocks in vue SFCs (go-gitea#26874)
  Make it posible to customize nav text color via css var (go-gitea#26807)
  Enable djlint H008 and fix issues (go-gitea#26869)
  Improve opengraph previews (go-gitea#26851)
  Add more descriptive error on forgot password page (go-gitea#26848)
  Allow users with write permissions for issues to add attachments with API (go-gitea#26837)
  Move licenses.txt to /assets directory (go-gitea#26866)

# Conflicts:
#	templates/base/footer_content.tmpl
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants