-
Notifications
You must be signed in to change notification settings - Fork 18k
x/pkgsite: show interfaces/implementations #72904
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
Comments
maybe a dupe of #20131 ? |
Thanks, yeah, it is essentially a dupe.
This feature has a long history. I implemented it in x/tools/cmd/godoc over a decade ago but it never made it to pkgsite. I suspect that it may be trickier to implement fully in pkgsite because (a) unlike godoc, pkgsite doesn't type-check anything and (b) pkgsite doesn't currently show any cross-package derived data, which would requirea global index. |
Will this be implemented in the global space for all Go packages in the world? Golds implements this in a project scope. |
Ranking is clearly a part of the solution. I would expect to see implementations in the same package before those in dependencies in the same module, before non-dependency packages in the same module, before arbitrary dependencies in other modules, before arbitrary unrelated packages in the ecosystem. The last could be behind a "more..." button. |
This is a large feature. Don't expect it anytime soon. |
A Go user is confused as to how to find implementations of interfaces: https://bsky.app/profile/sszuecs.bsky.social/post/3lis5o4nv322u.
Google's internal package index relates each interface type to its concrete implementations (and vice versa), and each interface method to it corresponding method. This would be useful information to display in pkgsite too.
It requires a global index of methods, similar to what we build in gopls and Google's internal package index, but the ideas are familiar at this point.
The text was updated successfully, but these errors were encountered: