-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
"Rename Symbol" often fails to rename when using Rope #52
"Rename Symbol" often fails to rename when using Rope #52
Comments
I can verify this is an issue. Using the following code: def fxn():
B = 42
Y = B + 13
return B + Y I just simply tried renaming |
Actually, when I tried doing rename on that code (changing B to O) it went from
to
deleting a line completely. |
@puzzler10 can you open a new issue? |
I'm on the latest vscode (to date) and I find renaming symbols is a "hit or miss" feature. Feels like there's a 50% chance it works with Python code. |
@fredrikaverpil the trickiness with this is knowing whether this is our fault or rope not working properly. |
@brettcannon I understand. Hm. When it misses the next time, is there any way I troubleshoot it and investigate whether it is rope's fault? EDIT: And by the way, thanks for an absolutely fantastic product. I live and breathe Python in vscode at least 8hrs a day 😉 |
@fredrikaverpil not at the moment; we have #1131 for adding logging throughout the extension as that's a major shortcoming we have. And thanks for the compliment! |
I'm on VSCode 1.22.2, Mac OS 10.13.4, Python 3.6, just installed rope fresh from pip. I get three different kinds of behavior from the following code (example). My problems seem to be related to the OP's, but somehow a superset of symptoms...
Action: highlight one of the
I'm not sure how to get any of the output logs I've seen on other threads. |
Using the example provided by @pdhorn above, I found some other issues. When I am renaming
Is it a problem of VS Code version: 1.24.1 |
@singularitti we have no recommendation beyond the latest release. |
My issues seem to have resolved themselves with an upgrade to VS Code 1.24.1 and macOS 10.13.5. Some extensions may have upgraded, too. |
Fails for me sometimes as well. Here's a screenshot with an actual error. Just closing Code and reopening it again fixes that error. VS Code version: Code 1.24.1 (24f62626b222e9a8313213fb64b10d741a326288, 2018-06-13T17:47:35.732Z) System Info
Extensions (4)
|
This comment has been minimized.
This comment has been minimized.
The "Rename symbol" command is made possible because of rope, right? As far as I understand, rope does not support Python 3, although their pypi page says "Full python3 support is in progress… stay tuned". Could it be that we are seeing issues with "Rename symbol" because of working with Python 3? This is my vscode version (as of writing this) and I'm working with a venv which is Python 3.6 or 3.7 with rope 0.11.0 pip-installed in the venvs:
|
Did anywhere exist other extension support renaming variable of python code within vscode? I could not find one on the extensions panel. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@cipri-tom please open a new issue as this issue is specific to those using Rope (and thus are not using the language server). I also can't reproduce the problem, so please try to give details like whether the file was dirty, the name of the file, etc. |
It's not hit-or-miss for me. It's just miss. I've tried around 20 times and it never ever works. I press enter, the input box closes, and nothing changes. |
It seems Python symbol refactoring has stopped working for me altogether! |
No worky for me. Box closes, no change. Using current insiders |
same issue, can not solve it. "find all references" stopped working as well. |
We're actively working to getting renaming working with our new language server which should replace our need to rely on Rope. |
I already disabled Jedi and using language server. Is this the reason why I can't use rename with rope? |
I added |
@calvin620707 correct, but the new language server has built-in support (at least in the beta channel as of version 0.2.53). |
FAIL CASERename Symbol ALWAYS fails without error when NO WORKSPACE FOLDER is open. (#5301) |
Are there any plans to fix this? I'm still getting this with Version: 1.35.1 |
@karrtikr - I notice that you closed that other issue, saying it is working as desired. VSCode gives no explanation for why the rename failed. That hardly seems like desirable behavior. |
@ThatAIGeek there's nothing really to fix directly; Rope simply failed and we don't control Rope. Please try the language server to see if it's renaming support works for you (see #3977 for instructions on how to do that). @v-kydela as I mention above, Rope only provides us so much. Please try the language server to see if it does the renaming you want as that we do control and can fix. |
I'm a little confused. So disabling |
@fireattack Correct, disabling Jedi will activate the language server. It's related to Rope because the language server subsumes functionality of Jedi, Rope, and Pylint for the extension. So if you turn on the language server we do not use Jedi or Rope and we stop prompting you to install Pylint to get syntax errors and such (but it will still run, it's just more of an opt-in thing). |
Closing as this is an upstream issue which we don't have direct control or influence over. |
Environment data
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.5.3 Anaconda 4.0.0
OS and version: Widows 10 Professional
Actual behavior
"Symbol Rename" for a Python symbol fails to rename in about 50% of cases. The symbol remains as its old name and is not renamed
Expected behavior
Rename to rename symbols everytime.
Steps to reproduce:
Symbol may not be renamed
Logs
Output from
Python
output panelNo output
The text was updated successfully, but these errors were encountered: