go
build_error
ai_generated
true
go: 模块作者已撤回 example.com/[email protected];运行 'go mod tidy' 更新
go: example.com/[email protected] is retracted by the module author; run 'go mod tidy' to update
ID: go/go-mod-tidy-fails-on-retracted
80%修复率
86%置信度
0证据数
2024-08-30首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 1.16 | active | — | — | — |
| 1.17 | active | — | — | — |
| 1.18 | active | — | — | — |
| 1.19 | active | — | — | — |
| 1.20 | active | — | — | — |
| 1.21 | active | — | — | — |
| 1.22 | active | — | — | — |
| 1.23 | active | — | — | — |
根因分析
模块作者已撤回某个版本,将其标记为已弃用或不安全,但 go.mod 仍引用它。
English
The module author has retracted a version, marking it as deprecated or insecure, but go.mod still references it.
解决方案
-
90% 成功率 Run 'go mod tidy' to automatically upgrade to a non-retracted version
go mod tidy
-
85% 成功率 Manually upgrade to a specific newer version
go get example.com/[email protected]
无效尝试
常见但无效的做法:
-
Ignoring the warning and continuing to build
40% 失败
Builds may succeed, but the retracted version may have security vulnerabilities or be removed in the future.
-
Manually editing go.mod to re-add the retracted version
90% 失败
Go will still detect it as retracted and issue the same warning.