go: cmd/go: return best-effort results despite inconsistent vendoring

Following up on https://github.com/golang/go/issues/39100, is it possible for the go command to return partial results even with an inconsistent vendor folder? This is done in several (arguably smaller) cases, like #35973 and #38846.

If go list could return partial results along with the error, that would make the experience in gopls much better for users. Right now, our best option will be to show the user a pop-up with the error message and a button that, when clicked, runs go mod vendor. This work-around is fine for now, but I wonder if there is a better longterm solution.

/cc @bcmills @jayconrod @heschik

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 9
  • Comments: 19 (10 by maintainers)

Most upvoted comments

Removing gopls from setting.json did the trick for me.

This seems to be still happening.

any updates ? I’m using go1.17.5,re-run go mod tidy go mod vendor doesn’t work.Is there a workaround?

https://github.com/golang/vscode-go/issues/1595#issuecomment-1043295536

@AbbyDeng no, that test script edits go.mod and should rerun go mod tidy and go mod vendor after it does so

cc @matloob

Tentatively milestoning for 1.16. @bcmills could confirm feasibility of this though.

I think this is possible, but it will make looking up which module provides each package unreliable. We’d probably only want to do this with go list -e. That would work for gopls though, right?