go
build_error
ai_generated
true
go: example.com/[email protected]:无效的伪版本:与版本控制时间戳不匹配
go: example.com/[email protected]: invalid pseudo-version: does not match version-control timestamp
ID: go/invalid-pseudo-version
80%修复率
82%置信度
0证据数
2024-09-14首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 1.13 | active | — | — | — |
| 1.14 | active | — | — | — |
| 1.15 | active | — | — | — |
| 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
A pseudo-version in go.mod has a timestamp or commit hash that does not correspond to any actual commit in the repository.
解决方案
-
90% 成功率 Use 'go get' to fetch the correct pseudo-version from the repository
go get example.com/module@master
-
85% 成功率 Run 'go mod tidy' to let Go resolve the correct version
go mod tidy
无效尝试
常见但无效的做法:
-
Trying to use 'go mod edit -replace' with a different pseudo-version
80% 失败
Any incorrect pseudo-version will trigger the same validation error.
-
Deleting the pseudo-version from go.mod manually
70% 失败
Removing it without replacement will cause missing dependency errors.