Skip to content

chore(release): 停用 go install 渠道,发布只保留 release 资产 - #279

Merged
SheathedSharp merged 4 commits into
mainfrom
chore/release-retire-go-module-channel
Nov 12, 2026
Merged

SheathedSharp merged 4 commits into
mainfrom
chore/release-retire-go-module-channel

Conversation

@SheathedSharp

Copy link
Copy Markdown
Owner

为什么

engine/go.mod 的 module 路径没有 /v2 后缀,但 VERSION 已经走到 2.0.0。Go 的规则是:模块内有 go.mod 时路径必须匹配大版本号。实测:

$ go list -m .../engine@v2.0.0
invalid version: module contains a go.mod file, so module path must match major version

$ go install .../engine/cmd/oberth@latest     # docs/install.md 让用户跑的命令
go: downloading .../engine v1.4.0             # 静默装到 11 天前的版本

go install 这个渠道从 v2.0.0 起就已经坏了,且是静默的。scripts/go_install_test.py 没抓到,因为它用本地 file 代理并写死 v1.99.0-test 版本,永远只覆盖 1.x 形状。

决定:不修 module 路径(每次 major 都要改 450 处 import),直接停用这个渠道。安装走 install.sh / install.ps1、Homebrew tap、Linux .deb/.rpm,这几条都正常(releases/latest = v2.0.0,已核对)。

改了什么

  • docs/install.md / docs/install.zh.md:删除 go install 段落和卸载器里的 GOPATH 旁注(中英成对)
  • README.md / README.zh.md:渠道列举去掉 go install
  • scripts/release.py:--validate-tag 不再要求 engine/vX.Y.Z 标签;该标签的唯一用途就是 Go 模块版本标记,渠道移除后没有消费方
  • docs/agent/releasing.md / delivery skill:发版只创建 vX.Y.Z
  • scripts/go_install_test.py:删除,docs/agent/validation.md 同步移除说明
  • engine/internal/buildinfo:注释和用例标题按实际语义命名(模块版本兜底对任何未打 ldflags 的构建都适用,不特指 go install)

验证

实际执行并通过:

  • python3 scripts/check_docs.py → 6 pair(s) consistent
  • python3 -m unittest discover -s scripts -p '*_test.py' → 266 tests OK, skipped=1
  • go build ./...(engine)→ 通过
  • go vet ./internal/buildinfo/ ./internal/cmd/ → 通过
  • go test ./internal/cmd/ ./internal/buildinfo/ → ok(14.4s / 0.1s)

未执行:完整 scripts/release.py --verify-only(含 race 与真实服务场景,属 nightly 与发版流程),Windows 原生构建。

这还没关掉渠道

本次只是让渠道在文档里不存在。已经缓存过 v1.4.0 或显式 @v1.4.0 的用户仍能装到。要让 Go 侧给出明确报错需要 retract 指令,而 retract 是版本发布动作,另开 PR 处理。

🤖 Generated with Claude Code

SheathedSharp and others added 4 commits November 11, 2026 19:02
引擎不再作为 Go 模块发布,安装只走发布包、Homebrew tap 与 Linux 包。
删除中英两版的 go install 段落、卸载器里 GOPATH 的旁注,以及 README 的渠道列举。

Co-Authored-By: Claude Code <noreply@anthropic.com>
engine/ 标签的唯一用途是 go install 的模块版本标记。渠道移除后它没有消费方,
release.py 的 --validate-tag 不再要求它存在,发版只创建 vX.Y.Z。

Co-Authored-By: Claude Code <noreply@anthropic.com>
buildinfo 的模块版本兜底对任何未打 ldflags 的构建都适用,注释与用例标题按实际语义命名。
欢迎屏的渠道列举同步去掉已移除的 go install。

Co-Authored-By: Claude Code <noreply@anthropic.com>
该用例走本地 file 代理并写死 v1.99.0-test 版本,永远只覆盖 1.x 形状,渠道移除后失去意义。
validation.md 同步删掉对应说明。

Co-Authored-By: Claude Code <noreply@anthropic.com>
@SheathedSharp
SheathedSharp merged commit 66609b8 into main Nov 12, 2026
13 checks passed
@SheathedSharp
SheathedSharp deleted the chore/release-retire-go-module-channel branch November 12, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant