Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: improve diagnostic for module graph errors from unpruned transitive dependencies in 'go get' #48024

Open
bcmills opened this issue Aug 27, 2021 · 1 comment

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Aug 27, 2021

In the Go 1.17 release I left a TODO for a better error in a fairly obscure case (an error loading the versions found in the upgraded module graph, when that path arises from a transitive dependency of a go 1.16 or earlier module).

The error today should indicate which module produced the error, but ideally the error should also log the path to that module.

Such errors should become more rare over time as modules upgrade to go 1.17 and higher. However, it would still be nice to do the TODO for the better diagnostic at some point.

if go117LazyTODO {
// Compute the requirement path from a module path in tryUpgrade to the
// error, and the requirement path (if any) from rs.rootModules to the
// tryUpgrade module path. Return a *mvs.BuildListError showing the
// concatenation of the paths (with an upgrade in the middle).
}

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 27, 2021

Change https://golang.org/cl/345392 mentions this issue: cmd/go/internal/modload: remove go117LazyTODO

@bcmills bcmills changed the title cmd/go: improve diagnostic for module graph errors from unpruned transitive dependencies 'go get' cmd/go: improve diagnostic for module graph errors from unpruned transitive dependencies in 'go get' Aug 30, 2021
gopherbot pushed a commit that referenced this issue Aug 30, 2021
Replace the last remaining use with a reference to #48024.

Change-Id: I699711b4e42abe9c6d3512c28d2ee81a84e3263a
Reviewed-on: https://go-review.googlesource.com/c/go/+/345392
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants