# go: 模块要求不兼容的依赖版本

- **ID:** `go/mod-tidy-incompatible`
- **领域:** go
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

模块依赖要求与 go.mod 中指定的传递依赖版本不同，导致冲突。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.20 | active | — | — |
| 1.21 | active | — | — |
| 1.22 | active | — | — |

## 解决方案

1. **Update the conflicting dependency to a version that satisfies all requirements.** (75% 成功率)
   ```
   Run 'go get golang.org/x/text@v0.4.0' and then 'go mod tidy' to resolve.
   ```
2. **Use a replace directive to force a version.** (70% 成功率)
   ```
   Add to go.mod: 'replace golang.org/x/text v0.3.0 => golang.org/x/text v0.4.0' if compatible.
   ```

## 无效尝试

- **Deleting go.sum and running 'go mod tidy' again.** — The conflict is in go.mod; tidy will re-resolve but may not fix incompatibility. (70% 失败率)
- **Forcing an update with 'go get -u golang.org/x/text@v0.3.0'.** — This may break other dependencies that require v0.4.0. (60% 失败率)
