{"record":{"id":"c42cac31ba6ab619","repo":"golang/go","slug":"unable-to-parse-output-of-fossil-info","errorCode":null,"errorMessage":"unable to parse output of fossil info","messagePattern":"unable to parse output of fossil info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/go/internal/vcs/vcs.go","lineNumber":321,"sourceCode":"\n// fossilRepoName is the name go get associates with a fossil repository. In the\n// real world the file can be named anything.\nconst fossilRepoName = \".fossil\"\n\n// vcsFossil describes how to use Fossil (fossil-scm.org)\nvar vcsFossil = &Cmd{\n\tName: \"Fossil\",\n\tCmd:  \"fossil\",\n\tRoots: []isVCSRoot{\n\t\tvcsFileRoot(\".fslckout\"),\n\t\tvcsFileRoot(\"_FOSSIL_\"),\n\t},\n\n\tScheme: []string{\"https\", \"http\"},\n\tStatus: fossilStatus,\n}\n\nvar errFossilInfo = errors.New(\"unable to parse output of fossil info\")\n\nfunc fossilStatus(vcsFossil *Cmd, rootDir string) (Status, error) {\n\toutb, err := vcsFossil.runOutputVerboseOnly(rootDir, \"info\")\n\tif err != nil {\n\t\treturn Status{}, err\n\t}\n\tout := string(outb)\n\n\t// Expect:\n\t// ...\n\t// checkout:     91ed71f22c77be0c3e250920f47bfd4e1f9024d2 2021-09-21 12:00:00 UTC\n\t// ...\n\n\t// Extract revision and commit time.\n\t// Ensure line ends with UTC (known timezone offset).\n\tconst prefix = \"\\ncheckout:\"\n\tconst suffix = \" UTC\"\n\ti := strings.Index(out, prefix)","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/vcs/vcs.go#L303-L339","documentation":"fossilStatus runs `fossil info` and parses the `checkout:` line for the hash and timestamp (errFossilInfo). If the expected line/format is absent it returns this error.","triggerScenarios":"A Fossil repository whose `fossil info` output lacks the expected checkout line — e.g. a fresh repo with no checkout, an unsupported Fossil version, or a corrupt checkout file (.fslckout/_FOSSIL_).","commonSituations":"Newly created Fossil repos; CI with mismatched Fossil versions; deleted/missing checkout artifacts.","solutions":["Run `fossil info` manually in the repo and inspect the output.","Ensure a checkout exists (`fossil open <repo>`).","Upgrade Fossil to a supported release.","Switch the module to git if possible."],"exampleFix":"# before\n$ cd /repo && go get -v .   # fossil repo, no checkout -> unable to parse\n\n# after\n$ fossil open /repo.fossil && go get -v .","handlingStrategy":"validation","validationCode":"// Confirm fossil info is parseable before relying on it.\nfunc fossilOk(repoDir string) error {\n    out, err := exec.Command(\"fossil\", \"info\").CombinedOutput()\n    if err != nil { return err }\n    if !bytes.Contains(out, []byte(\"checkout:\")) {\n        return errors.New(\"fossil info lacks checkout line\")\n    }\n    return nil\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Run `fossil open` so a checkout exists before go-get operations.","Keep Fossil at a supported version.","Prefer git where possible."],"tags":["vcs","fossil","parsing"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}