AlexStocks commented on code in PR #389:
URL: https://github.com/apache/dubbo-go-hessian2/pull/389#discussion_r2969049155
##########
go.mod:
##########
@@ -1,7 +1,16 @@
module github.com/apache/dubbo-go-hessian2
+go 1.21
+
require (
- github.com/dubbogo/gost v1.13.1
+ github.com/dubbogo/gost v1.14.0
github.com/pkg/errors v0.9.1
- github.com/stretchr/testify v1.7.0
+ github.com/stretchr/testify v1.11.1
Review Comment:
testify 从 v1.7.0 跳到 v1.11.1,跨了 4 个 minor 版本。v1.8+ 有不少变更:assert.Equal 的 float
比较容差变了、错误信息格式变了、引入了 require 子包等。直接跳过中间版本容易踩坑。
建议:分步升级,先升到 v1.8.x,验证后再升 v1.9、v1.10,最后到 v1.11。或者至少在 PR 描述里说明已经验证过 v1.11.1
的行为差异。
##########
.github/workflows/github-actions.yml:
##########
@@ -29,25 +29,36 @@ jobs:
DING_SIGN: ${{ secrets.DING_SIGN }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
Review Comment:
PR 描述说 "Go 版本对齐 1.25",但 master 的 CI matrix 本身就是 Go
1.25,并没有需要对齐的地方。这句描述容易误导,让人以为 master 之前版本不对。实际需要对齐的只是 actions 版本(checkout
v2→v4、setup-java v1→v4、setup-go v2→v5)和 cache key 格式。
建议:修改 PR 描述,删除 "Go 版本对齐 1.25" 这句,改为说明 GitHub Actions 各步骤的版本升级。
##########
go.mod:
##########
@@ -1,7 +1,16 @@
module github.com/apache/dubbo-go-hessian2
+go 1.21
Review Comment:
添加 `go 1.25` 指令会强制要求用户使用 Go 1.25+ 才能编译。hessian2 是基础库,dubbo-go 生态通常要求支持 Go
1.18~1.20。这个指令加上去之后,所有下游用户都必须跟着升 Go 版本。
建议:去掉 `go` 指令,或者用更保守的版本(如 `go 1.21`),让用户根据自己的 Go 版本来决定是否可用。CI 已经跑着 1.25
了,测试覆盖已经保证,不依赖 go 指令来强制约束。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]