{
  "id": "go/go-mod-tidy-missing-go-sum-entry-for-module-providing-package",
  "signature": "go: missing go.sum entry for module providing package X; to add: go mod tidy",
  "signature_zh": "go：缺少提供包 X 的模块的 go.sum 条目；要添加：go mod tidy",
  "regex": "go: missing go\\.sum entry for module providing package ([\\w./-]+)",
  "domain": "go",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The go.sum file is missing checksums for a dependency required by the current module, often after adding a new import or updating go.mod manually.",
  "root_cause_type": "generic",
  "root_cause_zh": "go.sum 文件缺少当前模块所需依赖项的校验和，通常是在添加新导入或手动更新 go.mod 后发生。",
  "versions": [
    {
      "version": "go1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "go1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "go1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Manually edit go.sum to add the missing checksum",
      "why_fails": "go.sum is machine-generated and manual edits are overwritten or cause checksum mismatches",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Delete go.sum and go.mod and start over",
      "why_fails": "Deletes all dependency info; may lose version constraints and cause other errors",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Set GONOSUMCHECK=* to bypass checksum verification",
      "why_fails": "Disables security verification and is not portable across builds",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Run 'go mod tidy' to regenerate go.sum with all required checksums",
      "success_rate": 0.98,
      "how": "Run 'go mod tidy' to regenerate go.sum with all required checksums",
      "condition": "",
      "sources": []
    },
    {
      "action": "If go mod tidy fails, run 'go mod download' first, then 'go mod tidy'",
      "success_rate": 0.95,
      "how": "If go mod tidy fails, run 'go mod download' first, then 'go mod tidy'",
      "condition": "",
      "sources": []
    },
    {
      "action": "For vendored projects, run 'go mod vendor' after tidy to sync vendor directory",
      "success_rate": 0.93,
      "how": "For vendored projects, run 'go mod vendor' after tidy to sync vendor directory",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "运行 'go mod tidy' 重新生成包含所有必需校验和的 go.sum",
    "如果 go mod tidy 失败，先运行 'go mod download'，再运行 'go mod tidy'",
    "对于使用 vendor 的项目，在 tidy 后运行 'go mod vendor' 以同步 vendor 目录"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://go.dev/ref/mod#go-sum-files",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.98,
  "resolvable": "true",
  "first_seen": "2023-05-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}