Skip to content

trpc-go v1.1.0 不兼容 fasthttp v1.51+,建议同步升级生态库依赖 #249

Closed

Description

@LuYongwang

trpc-go v1.1.0 与 fasthttp v1.51.0 不兼容(RoundTripper 接口变更导致编译失败)

在项目中同时引入以下依赖时,编译失败:

trpc.group/trpc-go/trpc-go v1.1.0
trpc.group/trpc-go/trpc-database/mongodb v1.0.0

trpc-database/mongodb 间接依赖了:

github.com/valyala/fasthttp v1.51.0

错误日志

../go/pkg/mod/trpc.group/trpc-go/trpc-go@v1.1.0/http/fasthttp_client.go:73:19:
cannot use func(req *fasthttp.Request, rsp *fasthttp.Response) error {…}
as fasthttp.RoundTripper value in assignment:
func(req *fasthttp.Request, rsp *fasthttp.Response) error
does not implement fasthttp.RoundTripper (missing method RoundTrip)
trpc-go v1.1.0
 └── fasthttp v1.43.0

trpc-database/mongodb v1.0.0
 └── fasthttp v1.51.0 (indirect)

Activity

  1. changed the title [-]其他组件的版本啥时候更新下呢?[/-] [+]trpc-go v1.1.0 不兼容 fasthttp v1.51+,建议同步升级生态库依赖[/+] on Aug 19, 2026
  2. bebilli commented on Sep 4, 2026

    @bebilli

    同样

  3. windyy10 commented on Oct 9, 2026

    @windyy10

    遇到相同问题了
    还有每次更新能否都升级下组件版本,大部分依赖的组件版本都是比较低的版本

  4. added a commit that references this issue on Nov 1, 2026
    4dfbb18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions