-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: go to definition should go to replaced version of module #73545
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
Can you please run |
@madelinekalil I do this with your suggestion,and it show the origin pkg but not the replaced pkg.eg: ![]() |
Sorry, the exact command you should run is |
@madelinekalil I do it again,and it show as follows: ![]() |
Oops, it should be "client-go" instead of "client.go". If go list cannot find this module then it will explain why the go to definition is not finding the replaced version of the module. |
@madelinekalil I apologize for the repeated error and I am very grateful for your patient explanation. I re-executed go list and compared the changes before and after the setting -mod=mod, and the output content is as follows: ![]() |
gopls version
golang.org/x/tools/gopls v0.18.1
go env
What did you do?
I use vocode with gopls to read kubernetes code,there are some replace pkg in go mod,and when i to find some function which define,it also redirect the vendor code but not the replaced pkg.If i need change some code,i also to find the realy replaced pkg which the function to be defined.
What did you see happen?
such as this because the code is replaced to staging code in the go mod file,but when i use gopls,it redirect to vendor code but the really staging code.If i need change the code something,i need to also to get the really place in the staging.
in go mod file,the picture pkg is replaced to staging pkg code,but the gopls is not correct redircet.
the picture code really pkg is staging file.
What did you expect to see?
I expect when some pkg to be replaced local pkg,can gopls support jumping to the actual code location after replaced by local code pkg.
Editor and settings
No response
Logs
No response
The text was updated successfully, but these errors were encountered: