Update to Go 1.22+ and refresh all dependencies#11
Conversation
- Update go.mod minimum Go version from 1.18 to 1.22 - Remove obsolete //go:build go1.16 and // +build go1.16 constraints from downloads/tarball_registry.go (always satisfied with Go 1.22+) - Update direct dependencies to latest Go 1.22-compatible versions: - github.com/spf13/cobra v1.4.0 -> v1.8.1 - github.com/spf13/pflag v1.0.5 -> v1.0.6 - github.com/stretchr/testify v1.8.0 -> v1.9.0 - github.com/go-sql-driver/mysql v1.4.1 -> v1.7.1 - github.com/dustin/go-humanize v1.0.0 -> v1.0.1 - github.com/rogpeppe/go-internal v1.9.0 -> v1.12.0 - github.com/alexeyco/simpletable v0.0.0 -> v1.0.0 - github.com/araddon/dateparse updated - github.com/nightlyone/lockfile v0.0.0 -> v1.0.0 - golang.org/x/exp updated to Jun 2024 - golang.org/x/term v0.13.0 -> v0.25.0 - golang.org/x/text v0.13.0 -> v0.19.0 - golang.org/x/net v0.17.0 -> v0.30.0 (fixes GO-2024-3333) - github.com/xi2/xz left pinned (unmaintained since 2017, tech debt) - github.com/pkg/errors v0.9.1 unchanged (already latest) - Note: go-sql-driver/mysql latest (v1.9.x) requires Go 1.24+; pinned at v1.7.1 for Go 1.22 compatibility
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s Go toolchain baseline to Go 1.22 and refreshes module dependencies to Go 1.22-compatible versions, including a golang.org/x/net upgrade for the referenced security advisory.
Changes:
- Bump
go.modminimum Go version from 1.18 to 1.22 and refresh direct/indirect dependency versions. - Update
golang.org/x/net(indirect) to v0.30.0 and refresh relatedx/*modules. - Remove obsolete Go 1.16 build constraints from
downloads/tarball_registry.go.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| go.mod | Updates Go version and dependency versions; adjusts indirect requirements. |
| go.sum | Syncs checksums to match the updated dependency set. |
| downloads/tarball_registry.go | Removes no-longer-relevant build tags given the new Go baseline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| google.golang.org/appengine v1.6.7 // indirect | ||
| golang.org/x/net v0.30.0 // indirect | ||
| golang.org/x/sys v0.26.0 // indirect | ||
| golang.org/x/tools v0.22.0 // indirect |
There was a problem hiding this comment.
golang.org/x/tools is listed as an indirect requirement, but there are no golang.org/x/tools imports in the repo (search returned no matches). Consider running go mod tidy and dropping this requirement if it’s not needed; otherwise it unnecessarily pins a module/version and can complicate future dependency updates.
| golang.org/x/tools v0.22.0 // indirect |
|
@gemini-code-assist review |
|
@claude review |
There was a problem hiding this comment.
Code Review
This pull request updates the project to Go 1.22 and refreshes most dependencies to their latest versions. The changes are well-described, including the rationale for pinned dependencies and the results of a vulnerability scan. The removal of obsolete build tags is also a good cleanup. I have one suggestion regarding the version of the go-sql-driver/mysql dependency, which appears to be pinned based on a misunderstanding of its compatibility with Go 1.22.
| github.com/alexeyco/simpletable v1.0.0 | ||
| github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de | ||
| github.com/dustin/go-humanize v1.0.1 | ||
| github.com/go-sql-driver/mysql v1.7.1 |
There was a problem hiding this comment.
The PR description mentions pinning github.com/go-sql-driver/mysql to v1.7.1 for Go 1.22 compatibility, stating that a newer version requires Go 1.24+. This seems to be a misunderstanding. The latest version of go-sql-driver/mysql is v1.8.1, which requires Go 1.21 and is compatible with Go 1.22. It's recommended to use the latest compatible version to get the most recent bug fixes and improvements.
| github.com/go-sql-driver/mysql v1.7.1 | |
| github.com/go-sql-driver/mysql v1.8.1 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated Go toolchain version from 1.18 to 1.22 in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Actions performedReview triggered.
|
1 similar comment
✅ Actions performedReview triggered.
|
Summary
go.modminimum Go version from 1.18 to 1.22//go:build go1.16/// +build go1.16build constraints fromdownloads/tarball_registry.gogolang.org/x/netfrom v0.17.0 to v0.30.0 (fixes GO-2024-3333: non-linear parsing of case-insensitive content)Closes #1
Dependency updates
Notes
github.com/xi2/xzleft pinned (unmaintained since 2017, tech debt)github.com/go-sql-driver/mysqllatest (v1.9.x) requires Go 1.24+; pinned at v1.7.1 for Go 1.22 compatibilitygithub.com/pkg/errorsv0.9.1 unchanged (already latest)Test plan
go build -o dbdeployer .compiles successfullysandboxandtspackages are pre-existing environment issues, not regressions)govulncheck ./...run and reviewedSummary by CodeRabbit
Release Notes