x/tools/gopls: Error due to trying to respect transient replace #44622
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
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a go project that imports "github.com/hashicorp/vault/api". That module in turn depends on github.com/hashicorp/vault/sdk but replaces it:
github.com/hashicorp/vault/sdk => ../sdk
This seems to break the gopls completion, it throws errors like this:
To my understanding, a
replace
should never get propagated. In this case it appears that happens for gopls, because my own project does not have thisreplace
:Project building and testing works fine, so this issue appears to be specific to
gopls
What did you expect to see?
gopls
to ignore the transient replace directive and not throwing an error when accessing objects in thereWhat did you see instead?
The text was updated successfully, but these errors were encountered: