-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: support Go assembly files #71754
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
Change https://go.dev/cl/649461 mentions this issue: |
Related Issues (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
This CL provides a minimal implementation of the Definition query within Go assembly files, plus a test. For now it only works for references to package-level symbols in the same package or a dependency. Details: - add file.Kind Asm and protocol.LanguageKind "go.s". - include .s files in metadata.Graph.IDs mapping. - set LanguageKind correctly in gopls CLI. Also: - add String() method to file.Handle. - add convenient forward deps iterator to Graph. - internal/extract: extract notes from .s files too. Updates golang/go#71754 Change-Id: I0c518c3279f825411221ebe23dc04654e129fc56 Reviewed-on: https://go-review.googlesource.com/c/tools/+/649461 Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]> Commit-Queue: Alan Donovan <[email protected]>
Change https://go.dev/cl/654335 mentions this issue: |
This CL adds a rudimentary parser for symbols in Go .s files. It is a placeholder for a more principled implementation, but it is sufficient to make Definition support control labels (also in this CL) and for a cross-references index (future work). + test of Definition on control label + test of asm.Parse Updates golang/go#71754 Change-Id: I2ff19b4ade130c051197d6b097a1a3dbcd95555a Reviewed-on: https://go-review.googlesource.com/c/tools/+/654335 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Auto-Submit: Alan Donovan <[email protected]>
Hello, I'd like to try to take on this task. |
Thanks for offering. I suggest you start with the first (unchecked) bullet point in its own CL. |
ok,tanks |
Change https://go.dev/cl/665135 mentions this issue: |
The CompiledAsmFiles field supports storing assembly files. Fixes golang/go#71754
Change https://go.dev/cl/665018 mentions this issue: |
The asmFiles field supports storing assembly files. Fixes golang/go#71754
Gopls already supports navigating from Go source to assembly files (use "Go to definition" on a
func
declaration with no body), but it wouldn't be hard for it to support navigation within assembly files, and from assembly files to Go files. The necessary parts are:go.s
LanguageID.file.Asm
.go.s
languageID support in eglot, vscode-go, neovim.This is obviously not a high priority, but it's a fun little project.
@golang/compiler @golang/runtime
The text was updated successfully, but these errors were encountered: