Renaming rarely works
Joebeazelman opened this issue · 3 comments
When I try to rename an identifier (the name of a function, procedure, variable, or type) using VS Code's Rename Symbol menu option, it complains that it can't rename it without providing a reason. On other occasions, it lets me go through the process of renaming it but nothing happens. There has only been a few times when it successfully renamed an identifier.
We have an improvement that shows more information of failed refactoring in the problem windows. This will be in the next release. We are interested in fixing renaming issue. Please send us any reproducer for this issue.
I would have to send you my project which is confidential.
Please send us any reproducer for this issue.
In my experience, just about any Ada code at all will reproduce it. I used VS Code extensively during the 2023 Advent of Code, and the Rename feature didn't rename anything except the text I had clicked on. It wasn't able even to rename the label after an end
keyword.
For example, the following steps reproduce the issue for me:
alr init --bin test_rename
cd test_rename
codium .
- open src/test_rename.adb
- click on
Test_Rename
in line 1 - press
f2
- rename
Test_Rename
to anything at all - observe that line 4 still has
end Test_Rename