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

"Unused something" compile error should not disable renaming other symbols. #3589

Open
ohir opened this issue Nov 3, 2024 · 1 comment
Open
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@ohir
Copy link

ohir commented Nov 3, 2024

renaming "byLabel" to "byName" not possible because "acuterm.fairbe.org" has errors

Stubbing a function often results in a period of tinkering with names. As of now if you have a bunch of vars declared (eg multiple result parameters from a call) but not all are used yet the F2 rename does not work – because of a compilation error "unused variable".

This is frustrating as some of declared symbols are already used, sometimes in more than one place, but some are not. Safe changing via F2 can not be done unless one adds _,_,_= just to please vscode-go for a second or two.`

The extension should recognize such "coding in progress" state and allow to rename symbols.

@gopherbot gopherbot added this to the Untriaged milestone Nov 3, 2024
@findleyr
Copy link
Contributor

findleyr commented Nov 7, 2024

Renaming with gopls does work in the presence of many errors. Can you please share your gopls version (gopls -v version), as well as a reproducer where you would expect renaming to succeed and it doesn't?

@ansaba ansaba added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants