Skip to content

x/website: GC guide outdated reference to gopls settings #72911

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

Closed
anderseknert opened this issue Mar 17, 2025 · 3 comments
Closed

x/website: GC guide outdated reference to gopls settings #72911

anderseknert opened this issue Mar 17, 2025 · 3 comments
Assignees
Labels
Documentation Issues describing a change to documentation. website
Milestone

Comments

@anderseknert
Copy link

What is the URL of the page with the issue?

https://go.dev/doc/gc-guide#Escape_analysis

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0

Screenshot

Image

What did you do?

Read the GC guide docs on escape analysis.

What did you see happen?

The section on using VS Code to help understand the escape analysis emitted from the Go compiler doesn't reflect recent changes in gopls.

This information can also be visualized as an overlay in VS Code. This overlay is configured and enabled in the VS Code Go plugin settings.

  1. Set the ui.codelenses setting to include gc_details .
  2. Enable the overlay for escape analysis by[ setting ui.diagnostic.annotations to include escape ](https://github.com/golang/vscode-go/wiki/> settings#uidiagnosticannotations).

What did you expect to see?

  1. This feature is no longer available as a Code Lens but as a Code Action, and the doc should be updated to say that.
  2. The second point is incorrect, at least at the time of reporting this. Gopls v0.18.0 removed these configuration options. That change was later reverted, so from the next release (or whichever release includes the reverted change) this point should be correct once more.
  3. This one I'm less sure about, but I believe the Code Action option makes this feature available to more editors than VS Code. If that's correct, the docs should be updated to reflect that.

CC @findleyr and @adonovan as requested.

@gopherbot gopherbot added this to the Unreleased milestone Mar 17, 2025
@seankhliao seankhliao changed the title x/pkgsite: GC guide docs section on escape analysis outdated x/website: GC guide docs section on escape analysis outdated Mar 17, 2025
@gopherbot gopherbot added website Documentation Issues describing a change to documentation. labels Mar 17, 2025
@seankhliao seankhliao changed the title x/website: GC guide docs section on escape analysis outdated x/website: GC guide outdated reference to gopls settings Mar 17, 2025
@adonovan adonovan self-assigned this Mar 17, 2025
@adonovan
Copy link
Member

adonovan commented Mar 17, 2025

Thanks for pointing out the error. Glad you were able to figure out the correct way. Fix pending in CL 658675.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/658675 mentions this issue: _content/doc/gc-guide: update docs on gopls' compiler escape analysis

@anderseknert
Copy link
Author

Not even an hour passed before the issue is resolved. Absolutely awesome! Thanks, @adonovan 😃

(and thanks @seankhliao for getting the labeling right... I wasn't sure what to use)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues describing a change to documentation. website
Projects
None yet
Development

No branches or pull requests

4 participants