{"record":{"id":"adff4b0f43bf5ffc","repo":"dagger/dagger","slug":"no-scheme","errorCode":null,"errorMessage":"no scheme","messagePattern":"no scheme","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/vcs/vcs.go","lineNumber":532,"sourceCode":"\t\t// e.g. Bitbucket, GitLab\n\t\tRepo: strings.TrimSuffix(metaImport.RepoRoot, \".git\"),\n\t\tRoot: metaImport.Prefix,\n\t}\n\tif rr.VCS == nil {\n\t\treturn nil, fmt.Errorf(\"%s: unknown vcs %q\", urlStr, metaImport.VCS)\n\t}\n\treturn rr, nil\n}\n\n// validateRepoRoot returns an error if repoRoot does not seem to be\n// a valid URL with scheme.\nfunc validateRepoRoot(repoRoot string) error {\n\turl, err := url.Parse(repoRoot)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif url.Scheme == \"\" {\n\t\treturn errors.New(\"no scheme\")\n\t}\n\treturn nil\n}\n\n// metaImport represents the parsed <meta name=\"go-import\"\n// content=\"prefix vcs reporoot\" /> tags from HTML files.\ntype metaImport struct {\n\tPrefix, VCS, RepoRoot string\n}\n\n// errNoMatch is returned from matchGoImport when there's no applicable match.\nvar errNoMatch = errors.New(\"no import match\")\n\n// pathPrefix reports whether sub is a prefix of s,\n// only considering entire path components.\nfunc pathPrefix(s, sub string) bool {\n\t// strings.HasPrefix is necessary but not sufficient.\n\tif !strings.HasPrefix(s, sub) {","sourceCodeStart":514,"sourceCodeEnd":550,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/engine/vcs/vcs.go#L514-L550","documentation":"errNoMatch ('no import match') is the sentinel error returned by matchGoImport when none of the parsed go-import meta tags' prefixes is a whole-path-component prefix of the requested import path. In RepoRootForImportDynamic it is translated into 'parse %s: no go-import meta tags' rather than propagated as-is; in matchGoImport's second call site it surfaces as the bare sentinel.","triggerScenarios":"Calling RepoRootForImportDynamic on an import path whose host page contains go-import meta tags but none whose Prefix matches the path at a path-component boundary, e.g. page advertises prefix 'uni.edu/bob' while importing 'uni.edu/bobby/proj'. Also returned directly from matchGoImport in tests.","commonSituations":"Typo in the import path (wrong module name); meta tag prefix doesn't cover the imported subpackage; trailing-segment mismatches after removing '..' components; importing a path the vanity host deliberately doesn't serve.","solutions":["Check the import path against the Prefix values in the page's go-import tags and use the advertised prefix","Update the meta tag to cover the full module path, e.g. content=\"uni.edu/bobby/proj vcs repo\"","Remember prefix matching is per path component: 'uni.edu/bob' does not match 'uni.edu/bobby/proj'","If the error message is 'parse <url>: no go-import meta tags', it means errNoMatch occurred after tags were parsed — compare paths carefully"],"exampleFix":"<!-- before: prefix doesn't cover the import -->\n<meta name=\"go-import\" content=\"uni.edu/bob git https://github.com/bob/proj\">\n<!-- importing uni.edu/bobby/proj fails -->\n<!-- after -->\n<meta name=\"go-import\" content=\"uni.edu/bobby/proj git https://github.com/bob/proj\">","handlingStrategy":"try-catch","validationCode":"func tagMatchesPath(tag, importPath string) bool {\n    prefix := strings.Fields(tag)[0]\n    rem := strings.TrimPrefix(importPath, prefix)\n    return strings.HasPrefix(importPath, prefix) && (rem == \"\" || strings.HasPrefix(rem, \"/\"))\n}","typeGuard":null,"tryCatchPattern":"rr, err := RepoRootForImportDynamic(path, false)\nif err != nil && strings.Contains(err.Error(), \"no go-import meta tags\") {\n    return fmt.Errorf(\"no meta tag prefix covers %q; verify module name matches the tag prefix\", path)\n}","preventionTips":["Import exactly the module path declared by the meta tag prefix","Remember prefix matching is component-wise: /bob never matches /bobby","Test one representative import per module prefix in CI","Keep a single authoritative prefix list for your vanity domain"],"tags":["vcs","vanity-imports","path-matching"],"backgroundTag":"no-import-match","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}