AlexStocks commented on code in PR #3498:
URL: https://github.com/apache/dubbo-go/pull/3498#discussion_r3687568735
##########
go.mod:
##########
@@ -7,7 +7,7 @@ require (
github.com/Workiva/go-datastructures v1.0.52
github.com/alibaba/sentinel-golang v1.0.4
github.com/apache/dubbo-getty v1.4.10
- github.com/apache/dubbo-go-hessian2 v1.12.5
+ github.com/apache/dubbo-go-hessian2 v1.13.2
Review Comment:
[P1] 当前 Head `09ca1031` 仍可复现该 MVS 兼容性破坏。相同外部混合模块在 Base 选择 hessian2 `v1.12.5`
并成功编译 `hessian.NewHessianCodec`;替换为当前 Head 后选择 `v1.13.2`,`go build
-mod=readonly ./...` 仍失败为 `undefined: hessian.NewHessianCodec`。截至本轮探针,上游 latest
仍没有恢复兼容入口的版本。本线程虽然已被标记 resolved,但根因没有被当前 commit 修复;仍需先在 hessian2 v1.x 恢复
Deprecated 入口并发布,或按新 major 建立迁移边界。
##########
protocol/dubbo/hessian2/hessian_response.go:
##########
@@ -34,20 +34,15 @@ import (
perrors "github.com/pkg/errors"
)
-// DubboResponse dubbo response
-type DubboResponse struct {
- RspObj any
- Exception error
- Attachments map[string]any
-}
-
-// GenericException keeps Java exception class and message.
+// GenericException is a type alias of hessian.GenericException for backward
Review Comment:
[P1] 兼容类型需要声明为真正的 alias
这里的注释说是 type alias,但下一行仍声明了新的 struct,所以旧包类型与上游 `hessian.GenericException`
在运行时并不等价。外部 Base/Head 探针通过公开 `HessianCodec.Write/Read` 往返同一个旧
`dubbohessian.GenericException`:Base 保留 `com.example.Err`,当前 Head 却把它降级为
`java.lang.Throwable` 并嵌套消息;解码后对 `*dubbohessian.GenericException` 的旧类型断言也从 Base
成功变成 Head 失败,实际类型为 `*hessian.GenericException`。请改为真正的 `type GenericException =
hessian.GenericException`,只在 Deprecated `ToGenericException` 的 string
分支保留旧字段语义,并增加外部包的编码往返与解码类型测试。
--
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]