-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
upgrade go-redis to v9(latest release version) #661
Conversation
@@ -5,10 +5,10 @@ go 1.16 | |||
require ( | |||
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d | |||
github.com/fatih/structs v1.1.0 | |||
github.com/go-redis/redis/v8 v8.11.5 | |||
github.com/redis/go-redis/v9 v9.0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go-redis
需要的版本是 go 1.18
,需要考虑一下 wechat
go version的升级
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go-redis v9已移交给redis官方,现在在github.com/redis/ 下,有redis官方背书,未来毫无疑问会大规模流行。
关于go version,go-redis表示只支持最近2个go版本,考虑到go的版本升级代价极小,建议积极支持新版本。
redis/go-redis#2323 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go-redis v9已移交给redis官方,现在在github.com/redis/ 下,有redis官方背书,未来毫无疑问会大规模流行。 关于go version,go-redis表示只支持最近2个go版本,考虑到go的版本升级代价极小,建议积极支持新版本。 redis/go-redis#2323 (comment)
那就修改一下版本
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix ci
还有 |
…nly support two latest go version
fix done |
执行一下 |
执行过了 |
Run go test -v -race ./...
go: github.com/redis/go-redis/v9@v9.0.2 requires
github.com/bsm/ginkgo/v2@v2.5.0: missing go.sum entry; to add it:
go mod download github.com/bsm/ginkgo/v2
Error: Process completed with exit code 1.
|
又试了一下,确实执行过,文件无变化。1.16,1.17,1.18报错信息并不相同,考虑版本引起的差异? |
wechat/.github/workflows/go.yml Line 13 in fbda048
1.18.x
wechat/.github/workflows/go.yml Line 41 in fbda048
修改为 "1.18.x","1.19.x","1.20.x"
|
冲突麻烦修正一下 |
conflict fix done |
Please review the code, thx |
升级之后需要考虑一部分低版本的用户的使用,是不是来一个新的分支并行发版 |
@houseme 这个通过tag来区分吧;引用不同的版本 |
建议撤销此pr。更好的做法是使用者自行实现Cache接口,使用者可以选用任意版本/任意设置redis实现,本包中的redis cache实现仅作为一个参考。 |
@GargantuaX 如果急需使用,可以 这样获取代码 #6b764e9 go get -u -v github.com/silenceper/wechat/v2@26b0aac |
谢谢。不过我换了使用方式,本地实现了一个Cache传入到wechat,所以不依赖此代码了 |
采纳,以及该 pr 关闭 |
因为社区内很多库已经转向V9,是时候升级了,否则用户将同时维护v8,v9两个client