-
Notifications
You must be signed in to change notification settings - Fork 18k
x/pkgsite: missing struct docs #42425
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
Thanks for finding this. I first feared that it was a bug in some recent work we've been doing on documentation rendering, but it actually predates that. It's related to that long field tag on |
Change https://golang.org/cl/240217 mentions this issue: |
Change https://golang.org/cl/276632 mentions this issue: |
…ering The presence of a long literal caused all struct fields comments to be removed. This imperfectly fixes the problem by collecting all comments when walking the declaration AST. Previously, it was thought that the comments in an ast.CommentedNode would augment the existing comments instead of replacing them (see golang/go#39219). The fix, as in https://golang.org/cl/240217 and copied here, is to collect all comments during the walk. This isn't sufficient, because using a CommentedNode also turns off the "contains filtered or unexported" comments that are normally added during printing. So we have to add them back manually, which is tricky, and can't be done perfectly (there are extra blank lines). For golang/go#42425 Change-Id: I0bd8e5ddfc764bc3c7610575e1e3eedf9c0bfd84 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/276632 Trust: Jonathan Amsterdam <[email protected]> Run-TryBot: Jonathan Amsterdam <[email protected]> Reviewed-by: Julie Qiu <[email protected]>
The comments are back but the "contains filtered or unexported fields" message is not in the right place. Leaving this open. |
Change https://golang.org/cl/284235 mentions this issue: |
What is the URL of the page with the issue?
https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/secretmanager/v1#Secret
Screenshot
pkg.go.dev:

godoc.org:
What did you do?
Navigate to pkg.go.dev to look up some docs.
What did you expect to see?
Struct field docs.
What did you see instead?
No documentation. Here is the source for the docs: source.
The text was updated successfully, but these errors were encountered: