Repository navigation
chore(plugin-sdk-go): Go SDK 升到 Go 1.27.4,和桌面端统一,CI 加上 Go SDK 任务 - #171
Merged
Merged
Conversation
… SDK 任务 - shared/plugins/sdk/go/go.mod 从 go 1.22 改为 go 1.27.4。go fix 在 1.27.4 下没有建议,SDK 代码和对外接口不变。 - Plugin SDKs 工作流新增 Go SDK 任务:setup-go 读 go.mod 的版本,跑 README 写的 test -race、gofmt -l 和 vet; SDK 没有依赖,不开缓存。端到端任务也用同一个 Go 构建 Go 示例,不再用 runner 自带的 Go。 - 契约 README 的 sdk/go 一段、插件总览、原生构建指南和四个 SDK 的 README 把 Go 1.22 改为 1.27.4; 插件总览不再说 CI 不跑 Go SDK 的检查。 - 插件协议更新记录的“待合入”加上本 PR。
xiaoyumuxi
marked this pull request as ready for review
November 22, 2026 05:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
无单独 Issue。Go SDK 原来要求 Go 1.22,CI 也没有 Go SDK 任务(只在端到端测试里用 runner 自带的 Go 构建 Go 示例)。这个 PR 把 SDK 的 Go 版本和桌面端统一到 1.27.4,并让 CI 按这个版本跑 Go SDK 自己的检查。
类型
改动说明
shared/plugins/sdk/go/go.modgo 1.22改为go 1.27.4。go fix -diff ./...在 1.27.4 下没有建议,所以 SDK 源码没有改。go.mod也要写go 1.27.4或更高。SDK 还没有打过标签,现在没有已发布的版本受影响。.github/workflows/plugins-verify.ymlGo SDK任务(sdk-go):actions/setup-go@v7用go-version-file: shared/plugins/sdk/go/go.mod读版本,和桌面端用desktop/go.mod的做法一样。go test -race ./...、gofmt -l(有未格式化文件就失败并列出来)、go vet ./...。cache: false。SDK end-to-end with Rust Core任务加上同一个 setup-go 步骤,Go 示例用 go.mod 的版本构建,不再依赖 runner 自带的 Go。文档
sdk/go一段,以及插件总览(中英 SDK 表、端到端测试需要的工具)、原生构建指南(中英)、Go/Rust/Java/Node.js 四个 SDK 的 README,都把 Go 1.22 改为 1.27.4。go.mod写的版本跑;Go SDK README 的 Testing 一节也补上这一句。reference/protocol-changelog.md的“待合入”加上本 PR。没有改的地方:
dlv安装器写的"minimumVersion": "1.22"。那是插件对用户机器上 Go 工具的要求,不是 SDK 的版本。build_runtime_versions.rs里的go1.22.3等测试数据。验证
go -C shared/plugins/sdk/go test -race -count=1 ./...通过。go -C shared/plugins/sdk/go vet ./...通过。gofmt -l shared/plugins/sdk/go没有输出。node shared/plugins/scripts/verify-docs.mjs通过。node --test shared/plugins/scripts/*.test.mjs:2 个测试通过。actionlint .github/workflows/plugins-verify.yml通过。golang:1.27.4,arm64 原生,只读挂载整个检出):同样的 test -race、gofmt、vet 全部通过,镜像已删除。Go SDK和SDK end-to-end with Rust Core的结果。后续
desktop/go.mod目前是toolchain go1.27.3,另开桌面端 PR 升到 go1.27.4,两边就完全一致了。