cmd/go: report importer-specific positions in go list dependency errors#78206
cmd/go: report importer-specific positions in go list dependency errors#78206fenghaojiang wants to merge 4 commits intogolang:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
This PR (HEAD: d313611) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/756380. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
|
Message from Alan Donovan: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
|
This PR (HEAD: 709979c) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/756380. Important tips:
|
|
Message from haojiang feng: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
|
Message from Michael Matloob: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
|
Message from haojiang feng: Patch Set 2: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
|
Message from Michael Matloob: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
|
Message from haojiang feng: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
|
Message from Michael Matloob: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
`IsImporterPos` is no longer implied by every `setPos` call.
|
This PR (HEAD: 31ff9a0) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/756380. Important tips:
|
|
Message from Michael Matloob: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/756380. |
When multiple packages import the same missing dependency, go list may
reuse a shared PackageError and report the same Pos for every importer.
This causes incorrect locations in DepsErrors and confuses downstream
tools that rely on precise positions.
This change records whether a PackageError position refers to the
importer side, then in collectDepsErrors clones dependency errors per
importer. For importer-side errors, it rewrites Pos using the current
package's ImportPos for that dependency (with short path formatting),
so each importing package gets its own correct location.
Fixes #78183.