{"record":{"id":"6a09731f5348af33","repo":"jackwener/OpenCLI","slug":"modulepath-has-no-semver-shaped-tags-on-proxy","errorCode":null,"errorMessage":"\"${modulePath}\" has no semver-shaped tags on proxy.golang.org.","messagePattern":"\"(.+?)\" has no semver-shaped tags on proxy\\.golang\\.org\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/goproxy/versions.js","lineNumber":41,"sourceCode":"        { name: 'limit', type: 'int', default: 30, help: 'Max rows to return (1-200)' },\n        { name: 'with-time', type: 'boolean', default: false, help: 'Fetch each version\\'s publish time (one extra request per row)' },\n    ],\n    columns: [\n        'rank', 'module', 'version', 'publishedAt', 'url',\n    ],\n    func: async (args) => {\n        const modulePath = requireModulePath(args.module);\n        const limit = requireBoundedInt(args.limit, 30, 200, 'limit');\n        const withTime = args['with-time'] === true;\n        const encoded = modulePath.split('/').map(encodeURIComponent).join('/');\n        const text = await goproxyText(`${GOPROXY_BASE}/${encoded}/@v/list`, `goproxy versions ${modulePath}`);\n        const raw = text.split(/\\r?\\n/).map((line) => line.trim()).filter(Boolean);\n        if (raw.length === 0) {\n            throw new EmptyResultError('goproxy versions', `proxy.golang.org returned no published versions for \"${modulePath}\".`);\n        }\n        const sorted = sortVersionsDescending(raw).slice(0, limit);\n        if (sorted.length === 0) {\n            throw new EmptyResultError('goproxy versions', `\"${modulePath}\" has no semver-shaped tags on proxy.golang.org.`);\n        }\n        const rows = sorted.map((v, i) => ({\n            rank: i + 1,\n            module: modulePath,\n            version: v,\n            publishedAt: null,\n            url: `${GOPROXY_BASE}/${encoded}/@v/${encodeURIComponent(v)}.info`,\n        }));\n        if (withTime) {\n            // Sequential to keep the proxy happy; cap at limit which is already <=200.\n            for (const row of rows) {\n                const info = await goproxyJson(`${GOPROXY_BASE}/${encoded}/@v/${encodeURIComponent(row.version)}.info`, `goproxy versions ${modulePath} ${row.version}`);\n                row.publishedAt = trimDate(info?.Time);\n            }\n        }\n        return rows;\n    },\n});","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/goproxy/versions.js#L23-L59","documentation":"Thrown by `goproxy versions` when @v/list returned lines but none matched the Go semver tag shape enforced by VERSION_TAG (e.g. v1.2.3 or pseudo-versions like v0.0.0-2024...). The library drops non-conforming entries in sortVersionsDescending and reports EmptyResultError when nothing valid remains, protecting downstream ranking logic from malformed tags.","triggerScenarios":"Running `goproxy versions <modulePath>` where the @v/list body contains only lines failing /^v[0-9]+(\\.[0-9]+)*([-+][A-Za-z0-9._-]+)?$/ — e.g. plain tags like \"1.0.0\" or \"release-1\", empty-ish lines removed by filtering.","commonSituations":"Repos tagging releases without the required Go \"v\" prefix (plain \"2.1.0\" tags are invalid Go module versions), malformed or custom tag schemes, or a proxy serving non-standard listings.","solutions":["Inspect the module's tags: git ls-remote --tags <repo>; if they lack the v prefix, re-tag with v-prefixed semver","Use `go tag`/`git tag vX.Y.Z && git push --tags` to create Go-compatible versions","If tags are intentional pseudo-versions, fetch the specific version directly instead of relying on @v/list","Confirm with `go list -m -versions <module>` whether Go itself recognizes any versions"],"exampleFix":"// before\ngit tag 1.2.0 && git push --tags\n// after\ngit tag v1.2.0 && git push --tags","handlingStrategy":"validation","validationCode":"const VERSION_TAG = /^v[0-9]+(\\.[0-9]+)*([-+][A-Za-z0-9._-]+)?$/;\nfunction listHasGoSemverTags(lines) {\n  return String(lines).split(/\\r?\\n/).some(l => VERSION_TAG.test(l.trim()));\n}\nif (!listHasGoSemverTags(rawList)) console.warn('No v-prefixed semver tags found');","typeGuard":"function isGoSemverTag(v) { return typeof v === 'string' && /^v[0-9]+(\\.[0-9]+)*([-+][A-Za-z0-9._-]+)?$/.test(v); }","tryCatchPattern":"try {\n  const versions = await goproxyVersions({ module });\n} catch (err) {\n  if (/no semver-shaped tags/i.test(err.message)) {\n    console.error('Repository tags are not Go-compatible; tags must look like v1.2.3.');\n  } else throw err;\n}","preventionTips":["Always git tag releases with a leading 'v' (v1.2.3, not 1.2.3)","Run `go list -m -versions <module>` to validate tags Go accepts","Avoid ad-hoc tag naming schemes on modules consumed by Go tooling"],"tags":["go","semver","empty-result","tags"],"backgroundTag":"invalid-version-tag","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}