go
build_error
ai_generated
true
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%Fix Rate
86%Confidence
0Evidence
2024-08-30First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.16 | active | — | — | — |
| 1.17 | active | — | — | — |
| 1.18 | active | — | — | — |
| 1.19 | active | — | — | — |
| 1.20 | active | — | — | — |
| 1.21 | active | — | — | — |
| 1.22 | active | — | — | — |
| 1.23 | active | — | — | — |
Root Cause
The module author has retracted a version, marking it as deprecated or insecure, but go.mod still references it.
generic中文
模块作者已撤回某个版本,将其标记为已弃用或不安全,但 go.mod 仍引用它。
Workarounds
-
90% success Run 'go mod tidy' to automatically upgrade to a non-retracted version
go mod tidy
-
85% success Manually upgrade to a specific newer version
go get example.com/[email protected]
Dead Ends
Common approaches that don't work:
-
Ignoring the warning and continuing to build
40% fail
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% fail
Go will still detect it as retracted and issue the same warning.