jackwener/OpenCLI · warning · EmptyResultError
"${modulePath}" has no semver-shaped tags on proxy.golang.or
Error message
"${modulePath}" has no semver-shaped tags on proxy.golang.org. What it means
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.
Source
Thrown at clis/goproxy/versions.js:41
{ name: 'limit', type: 'int', default: 30, help: 'Max rows to return (1-200)' },
{ name: 'with-time', type: 'boolean', default: false, help: 'Fetch each version\'s publish time (one extra request per row)' },
],
columns: [
'rank', 'module', 'version', 'publishedAt', 'url',
],
func: async (args) => {
const modulePath = requireModulePath(args.module);
const limit = requireBoundedInt(args.limit, 30, 200, 'limit');
const withTime = args['with-time'] === true;
const encoded = modulePath.split('/').map(encodeURIComponent).join('/');
const text = await goproxyText(`${GOPROXY_BASE}/${encoded}/@v/list`, `goproxy versions ${modulePath}`);
const raw = text.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
if (raw.length === 0) {
throw new EmptyResultError('goproxy versions', `proxy.golang.org returned no published versions for "${modulePath}".`);
}
const sorted = sortVersionsDescending(raw).slice(0, limit);
if (sorted.length === 0) {
throw new EmptyResultError('goproxy versions', `"${modulePath}" has no semver-shaped tags on proxy.golang.org.`);
}
const rows = sorted.map((v, i) => ({
rank: i + 1,
module: modulePath,
version: v,
publishedAt: null,
url: `${GOPROXY_BASE}/${encoded}/@v/${encodeURIComponent(v)}.info`,
}));
if (withTime) {
// Sequential to keep the proxy happy; cap at limit which is already <=200.
for (const row of rows) {
const info = await goproxyJson(`${GOPROXY_BASE}/${encoded}/@v/${encodeURIComponent(row.version)}.info`, `goproxy versions ${modulePath} ${row.version}`);
row.publishedAt = trimDate(info?.Time);
}
}
return rows;
},
});View on GitHub (pinned to 49907e53dc)
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
Example fix
// before git tag 1.2.0 && git push --tags // after git tag v1.2.0 && git push --tags
Defensive patterns
Strategy: validation
Validate before calling
const VERSION_TAG = /^v[0-9]+(\.[0-9]+)*([-+][A-Za-z0-9._-]+)?$/;
function listHasGoSemverTags(lines) {
return String(lines).split(/\r?\n/).some(l => VERSION_TAG.test(l.trim()));
}
if (!listHasGoSemverTags(rawList)) console.warn('No v-prefixed semver tags found'); Type guard
function isGoSemverTag(v) { return typeof v === 'string' && /^v[0-9]+(\.[0-9]+)*([-+][A-Za-z0-9._-]+)?$/.test(v); } Try / catch
try {
const versions = await goproxyVersions({ module });
} catch (err) {
if (/no semver-shaped tags/i.test(err.message)) {
console.error('Repository tags are not Go-compatible; tags must look like v1.2.3.');
} else throw err;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- proxy.golang.org returned no published versions for "${modul
- No chat-turn refs in ${repo}.
- No after-chat-turn tags found.
- No prices returned for train_no=${trainNo} ${fromStation.nam
- No 12306 stations match "${keyword}"
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/6a09731f5348af33.
Report an issue: GitHub.