Skip to content
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

pr #3088 made some commands not work.. #3093

Closed
Shane-XB-Qian opened this issue Nov 13, 2020 · 9 comments
Closed

pr #3088 made some commands not work.. #3093

Shane-XB-Qian opened this issue Nov 13, 2020 · 9 comments

Comments

@Shane-XB-Qian
Copy link

in pr #3088 limits some command away -if 'go#package#InGOPATH()' was not true.
// e.g ':GoCallees' ':GoCallstack' etc not working..
but actually such commands were not so strict limited by gopath, it can be working in the past..

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 13, 2020

The change you're referring to was in #2704, because guru does not support modules. I'm reluctant to re-enable it for that reason, but I'll give it some thought.

@Shane-XB-Qian
Copy link
Author

i saw you check-in those all at CommitDate: Thu Nov 12 20:56:58 2020 -0800,
and yes, looks you are limiting for guru, looks those commands almost all depends on guru, but those commands are useful, even was not in gopath or something.. simply directly using them probably had benefits...
// those not like #3030 GoKeyify, keyify looks had to wait gopls to make it work again.

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 14, 2020

While some guru commands might work in module aware mode in limited circumstances, because it cannot be counted on to work reliably, I do not intend to enable the commands outside of GOPATH mode. If you find guru useful, I would encourage you to continue to use GOPATH mode so that you will have the guru commands available.

@bhcleek bhcleek closed this as completed Nov 14, 2020
@Shane-XB-Qian
Copy link
Author

Shane-XB-Qian commented Nov 14, 2020

not sure why you are saying it is not 'reliably', it had worked outside of gopath long time,
or can we have alternative way from gopls to make those commands work again?
// at least let's prompt it 'not supported if out of gopath' -vs- now it's just saying E492 not a editor command.

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 14, 2020

Guru does not work reliably outside of GOPATH, because it relies on GOPATH and is not aware of modules at all.

I am working to convert as many of the commands that relied on guru to use gopls as possible.

@Shane-XB-Qian
Copy link
Author

Shane-XB-Qian commented Nov 14, 2020

um.. really? mostly my proj -or just a single tmp gofile it's not in gopath, even had no go-mod, but i recall i had used e.g GoChannelPeers long time..
// if you say so, then just wish them came back soon.. though i do not like this limitation.. and as i know most golang proj now is out of gopath.. so such limitation almost saying those commands not working perhaps for ever if so..

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 15, 2020

While I've read many comments that guru doesn't work with modules and I know for sure that it uses go/build instead of golang.org/x/tools/packages, it does seem to work in a many cases. I did some testing locally and found that most of it's functions work with modules in most circumstances.

I've created #3096 to re-enable the guru commands until I have a better understanding of the situations in which guru does not work with modules.

@Shane-XB-Qian
Copy link
Author

some years passed, the situations maybe clear now,
those bin in 'GoBinInstallation' maybe some of them can be removed now.

@Shane-XB-Qian
Copy link
Author

sorry, i mean gopls now mostly can replace them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants