Skip to content

Require Go 1.20 #264

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

Conversation

contrast-jproberts
Copy link

gogs/gogs@4821e89 upgraded a dependency which now uses errors.Join, a function introduced in go1.20 . This is now the minimum supported version to build gogs from source.

gogs/gogs@4821e89
upgraded a dependency which now uses errors.Join, a function
introduced in go1.20 . This is now the minimum supported version
to build gogs from source.
@contrast-jproberts
Copy link
Author

contrast-jproberts commented Oct 13, 2023

I was able to confirm the version support using docker run --rm -it golang:1.19 and following the steps in https://github.com/gogs/docs/blob/master/en-US/installation/install_from_source.md#compile-gogs . The build fails with the following output

root@82b1254a7695:/go/gogs# go build -o gogs
# github.com/editorconfig/editorconfig-core-go/v2
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/cached_parser.go:63:21: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/config.go:29:16: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/config.go:76:21: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/definition.go:48:20: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/definition.go:61:20: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/definition.go:75:20: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/editorconfig.go:92:21: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/editorconfig.go:214:16: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/editorconfig.go:241:16: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/editorconfig.go:258:16: undefined: errors.Join
../pkg/mod/github.com/editorconfig/editorconfig-core-go/v2@v2.6.0/editorconfig.go:258:16: too many errors
note: module requires Go 1.20

I then followed the same steps inside docker run --rm -it golang:1.20 and the build succeeded.

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.

1 participant