{"record":{"id":"73a9a5e1b407c4d8","repo":"golang/go","slug":"vcs-s-checkreuse-w","errorCode":null,"errorMessage":"vcs %s: CheckReuse: %w","messagePattern":"vcs (.+?): CheckReuse: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/cmd/go/internal/modfetch/codehost/vcs.go","lineNumber":420,"sourceCode":"\n\tif old.Ref != \"\" && old.RepoSum == \"\" {\n\t\thash, err := r.lookupRef(ctx, old.Ref)\n\t\tif err == nil && hash != \"\" && hash == old.Hash {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tr.repoSumOnce.Do(func() { r.loadRepoSum(ctx) })\n\tif r.repoSum != \"\" {\n\t\tif old.RepoSum == \"\" {\n\t\t\treturn fmt.Errorf(\"non-specific origin\")\n\t\t}\n\t\tif old.RepoSum != r.repoSum {\n\t\t\treturn fmt.Errorf(\"repo changed\")\n\t\t}\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"vcs %s: CheckReuse: %w\", r.cmd.vcs, errors.ErrUnsupported)\n}\n\nfunc (r *vcsRepo) Tags(ctx context.Context, prefix string) (*Tags, error) {\n\tunlock, err := r.mu.Lock()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer unlock()\n\n\tr.tagsOnce.Do(func() { r.loadTags(ctx) })\n\ttags := &Tags{\n\t\tOrigin: r.repoSumOrigin(ctx),\n\t\tList:   []Tag{},\n\t}\n\tfor tag := range r.tags {\n\t\tif strings.HasPrefix(tag, prefix) {\n\t\t\ttags.List = append(tags.List, Tag{tag, \"\"})\n\t\t}","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/modfetch/codehost/vcs.go#L402-L438","documentation":"CheckReuse fallback: the current repo produced no RepoSum (r.repoSum==\"\"), so none of the prior branches could verify reuse. The error wraps errors.ErrUnsupported, signalling that this VCS cannot deterministically confirm identity. The %s is the VCS name.","triggerScenarios":"loadRepoSum returned empty (cmd.repoSum==nil or the sum command failed silently) AND no hash/ref branch matched —svn and fossil typically land here because svn has no repoSum command.","commonSituations":"svn-backed vanity import being checked for reuse; fossil repo whose `fossil info` produced no parseable sum; a transient failure in loadRepoSum left repoSum empty.","solutions":["Use GOPROXY so the module zip is served without invoking VCS reuse checks.","Accept that reuse cannot be verified and let the go command re-download each time (slow but correct).","Migrate the upstream repo to git or hg, which support repoSum and enable reuse caching.","If svn is required, ensure the svn binary and remote are reachable so loadRepoSum does not silently fail."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"func vcsSupportsRepoSum(vcs string) bool {\n    return vcs == \"git\" || vcs == \"hg\"\n}","typeGuard":null,"tryCatchPattern":"if err := repo.CheckReuse(ctx, old, subdir); err != nil {\n    if errors.Is(err, errors.ErrUnsupported) {\n        // VCS cannot verify reuse — re-download unconditionally\n    }\n}","preventionTips":["Use GOPROXY for svn/fossil modules to bypass the unsupported CheckReuse path.","Migrate vanity imports to git where possible.","Treat ErrUnsupported from CheckReuse as 'always re-download', not as fatal."],"tags":["vcs","checkreuse","unsupported","svn","fossil"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T12:31:55.035Z"}