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

x/tools/cmd/gorename: Only work on current directory. #30456

Closed
markvincentcaro opened this issue Feb 28, 2019 · 6 comments
Closed

x/tools/cmd/gorename: Only work on current directory. #30456

markvincentcaro opened this issue Feb 28, 2019 · 6 comments

Comments

@markvincentcaro
Copy link

@markvincentcaro markvincentcaro commented Feb 28, 2019

Currently, the gorename tool is working on the entire GOPATH directory. If your GOPATH contains lots of projects (including third-party libraries like ones from GitHub), it becomes so slow that it is next to unusable.

When developers rename something, they are usually only interested in code inside their current directory.

The proposed solution is to change gorename to only work on code inside the current directory. If this is not possible, then a flag, setting, or environment variable can be added to configure gorename to either work on the entire GOPATH or only on the current directory.

@gopherbot gopherbot added this to the Unreleased milestone Feb 28, 2019
@markvincentcaro
Copy link
Author

@markvincentcaro markvincentcaro commented Feb 28, 2019

I would like to reference Issue #10917 to show that we Devs have been asking for this feature since 2015.

@bcmills
Copy link
Member

@bcmills bcmills commented Feb 28, 2019

@bcmills
Copy link
Member

@bcmills bcmills commented Feb 28, 2019

GOPATH mode is on its way out. gorename in module mode will not depend on the size of your GOPATH; #27571 tracks module mode support.

@bcmills bcmills closed this Feb 28, 2019
@markvincentcaro
Copy link
Author

@markvincentcaro markvincentcaro commented Feb 28, 2019

Hi, @bcmills

I think this issue should remain Open since Go Modules aren't that widespread yet and most Go Developers are still using classic projects.

Until Go Modules becomes the norm, this issue will affect pretty much everyone not using Modules.

@bcmills
Copy link
Member

@bcmills bcmills commented Feb 28, 2019

There wouldn't be much point to that. Realistically, nobody is going to update gorename until module support is the default: the folks who own the gorename tool are already busy implementing module support and gopls, and both of those are much higher priority than refactoring things in GOPATH mode.

@markvincentcaro
Copy link
Author

@markvincentcaro markvincentcaro commented Feb 28, 2019

@bcmills
I see. Hopefully, Go Modules catch on soon then. Currently, a lot of third-party libraries here on GitHub don't support it and break upon go get while in Modules mode.

@golang golang locked and limited conversation to collaborators Feb 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.