Repository navigation
Go backend: 'no versions found' when proxy list is legitimately empty (post-#9276, not covered by #9310) #9376
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! I think there's a second class of the #9276 regression that #9310 didn't cover, and I wanted to float it here before sending a PR.
What I hit
Upgrading to
2026.4.19broke any Go module that has no semver-tagged releases listed through the currentGOPROXY. For my case it was a private bitbucket module, but a fully public, reproducible version looks like this:The same command works on 2026.4.18, and
go install github.com/go-kratos/kratos/cmd/kratos/v2@latestworks standalone at any time.(That submodule has no own tags — only pseudo-versions — so
go list -m -versionsreturns.Versions = []. The commit message for #9310 already calls it out as an example.)Why I think #9310 only covers part of it
d0dc4a6is great — it fixes the test harness case whereGOPROXY=""was accidentally treated as "no proxies" instead of the Go default. But the underlying behavior introduced by #9276 is still there for any case where_list_remote_versionsreturns an empty list for legitimate reasons:GOPROXY=off(or any user-chosen setting that legitimately resolves to an empty proxy list)go list -m -versionssucceeds but returns no tagsIn each of those, mise used to fall through to
resolve_prefix("latest"), which passed the literal stringlatesttogo install …@latestand let Go's own resolver do the work. Post-#9276,ToolVersion::resolve_versiontreats an empty list as fatal, even when the backend is perfectly capable of resolving@latestnatively.Relevant code on
v2026.4.19:src/toolset/tool_version.rsL340-357 — the strictlatestbranch that errors when both local and remote returnNone.src/backend/go.rsL49-80 —_list_remote_versions, which legitimately returnsvec![]when the proxy has nothing andgo list -m -versionsreturns empty.Versions.What I'd like to propose
Keep the stricter resolution #9276 introduced for the fuzzy-request case it was fixing, but when
v == "latest"and bothlatest_installed_versionand the remotelatest_versionreturnNone, fall through to treatinglatestas a literal version token handed to the backend installer. That restores the pre-#9276 behaviour only for the degenerate empty-enumeration case, and keepsgo install <mod>@latestdoing what it already does well.A couple of things I'm genuinely unsure about and would love your call on before I open a PR:
latest" approach okay as a global behaviour, or would you prefer a backend-level opt-in (e.g.Backend::supports_native_latest()), so only backends that actually handle@latestnatively get the fallthrough?warn!("couldn't enumerate remote versions, passinglatestthrough to the installer") so users aren't surprised silently? Or keep it silent to match pre-fix(backend): stop fuzzy requests installing literal dirs #9276 UX?Happy to take it in whichever direction you prefer. Thanks for all the work on mise 🙏
All reactions