The modindex package copied some of the bits that were in go/build. Because there are two copies, the code can get out of sync, if they're not updated together. We should try to break out the shared code into an internal package to remove the copies.
This happened with https://go-review.googlesource.com/c/go/+/502615, for example.
Comment From: gopherbot
Change https://go.dev/cl/685317 mentions this issue: cmd/go/internal/modindex: apply changes in CL 502615 to modindex package
Comment From: gabyhelp
Related Code Changes
- cmd/go/internal/modindex: remove copy of build.Package
- cmd/go/internal/modindex: apply changes in CL 502615 to modindex package
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)