[Bug][Backend] Go version inconsistency between go.mod (1.20) and development environment (1.22)
Search before asking
- [x] I had searched in the issues and found no similar issues.
What happened
The project has inconsistent Go version requirements across different configuration files:
- go.mod: Specifies Go 1.20
- Development tools in Makefile: Require Go 1.21+ (golangci-lint@latest, mockery v2.43.0, swag v1.16.1)
- .devcontainer/Dockerfile: Uses Go 1.22 base image
When trying to run make dep or other Makefile targets with Go 1.20, users get prompted to upgrade to a higher Go version, causing confusion about which version is actually required.
What do you expect to happen
All Go version specifications should be consistent across the project. The go.mod file should reflect the actual minimum Go version required by the development toolchain.
How to reproduce
- Install Go 1.20
- Clone the repository
- Run
cd backend && make dep - Observe that development tools request a higher Go version than what's specified in go.mod
Anything else
This inconsistency creates confusion for new contributors and can lead to build failures. The .devcontainer already uses Go 1.22, suggesting this is the intended version.
Suggested fix: Update go.mod to specify Go 1.22 to match the development environment and toolchain requirements.
Version
Latest main branch
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Thanks for the report, I have on my backlog to upgrade the GO version of the project in order to reduce some of the problems of building locally that you are also mentioning.
Adding to this:
Trying to run make go-dev-tools on the backend/ folder is throwing an error is saying it needs >=Golang 1.24 to install. Another Go version inconsistency.
make go-dev-tools
# go install github.com/atombender/go-jsonschema/cmd/gojsonschema@latest
go install golang.org/x/tools/cmd/goimports@latest
go: golang.org/x/tools/cmd/goimports@latest: golang.org/x/[email protected] requires go >= 1.24.0 (running go 1.22.12; GOTOOLCHAIN=local)
make: *** [Makefile:36: go-dev-tools] Error 1
@spenpal I have made some updates, can you possibly checkout my branch and try them?
@petkostas Sorry for the late response. I will try tomorrow and let you know.
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
Not stale, will pick this up next week.