x/tools/gopls: can't generate completion for go-libzfs #34345
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, gopls refreshed from latest release (v0.1.6)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I typed the follow go code, with go-libzfs at 0.2.2:
when pressing "." after zfs, I receive garbage completion: "Global.mtx.{Lock;Unlock}". The gopls log outputs shows a lot of lines like:
Note that those files with that path exists on disk.
What did you expect to see?
I expect to see go-libzfs completion options.
What did you see instead?
I got unexpected completion proposals.
Go-pls information:
vscode settings are the default from the wiki page.
gopls -rpc.trace -v check
logs on that example file. Note the cgo linker failures (go-libzfs is using cgo against libzfs header libs). However,go build
on the same machine works fine, using compatible system headers which are installed on the machine (/usr/lib, /usr/include).Note the cflags/ldflags in common.go:
The text was updated successfully, but these errors were encountered: